Skip to content

Commit 3ee6473

Browse files
committed
Add more logging
1 parent e706f3d commit 3ee6473

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/gui/gtk.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,18 @@ static gboolean _scrolled(GtkWidget *widget,
773773
(void)user_data;
774774
GdkDevice *device = gdk_event_get_source_device((GdkEvent *)event);
775775

776+
dt_print(DT_DEBUG_INPUT,
777+
"[scroll] direction=%d smooth=%s stop=%s ctrl=%s"
778+
" x=%.1f y=%.1f dx=%.3f dy=%.3f state=0x%x"
779+
" device='%s' source-type=%d",
780+
event->direction,
781+
event->direction == GDK_SCROLL_SMOOTH ? "yes" : "no",
782+
event->is_stop ? "yes" : "no",
783+
dt_modifier_is(event->state, GDK_CONTROL_MASK) ? "yes" : "no",
784+
event->x, event->y, event->delta_x, event->delta_y, event->state,
785+
device ? gdk_device_get_name(device) : "<none>",
786+
device ? (int)gdk_device_get_source(device) : -1);
787+
776788
const gboolean ctrl_held = dt_modifier_is(event->state, GDK_CONTROL_MASK);
777789
const gboolean is_touchpad_source = device && gdk_device_get_source(device) == GDK_SOURCE_TOUCHPAD;
778790
const gboolean is_known_gesture_device = (device == _touchpad);

0 commit comments

Comments
 (0)