forked from AuroraMiddleware/gtk
wayland: Use GDK_NOTE for logging event debug messages
This commit is contained in:
parent
9f0ed18d5a
commit
f62e4a02b6
@ -288,6 +288,10 @@ input_handle_motion(void *data, struct wl_input_device *input_device,
|
|||||||
event->motion.is_hint = 0;
|
event->motion.is_hint = 0;
|
||||||
gdk_event_set_screen (event, display->screens[0]);
|
gdk_event_set_screen (event, display->screens[0]);
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS,
|
||||||
|
g_message ("motion %d %d, state %d",
|
||||||
|
sx, sy, event->button.state));
|
||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,8 +304,6 @@ input_handle_button(void *data, struct wl_input_device *input_device,
|
|||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
uint32_t modifier;
|
uint32_t modifier;
|
||||||
|
|
||||||
fprintf (stderr, "button event %d, state %d\n", button, state);
|
|
||||||
|
|
||||||
device->time = time;
|
device->time = time;
|
||||||
event = gdk_event_new (state ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
|
event = gdk_event_new (state ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
|
||||||
event->button.window = g_object_ref (device->pointer_focus);
|
event->button.window = g_object_ref (device->pointer_focus);
|
||||||
@ -322,6 +324,11 @@ input_handle_button(void *data, struct wl_input_device *input_device,
|
|||||||
else
|
else
|
||||||
device->modifiers &= ~modifier;
|
device->modifiers &= ~modifier;
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS,
|
||||||
|
g_message ("button %d %s, state %d",
|
||||||
|
event->button.button,
|
||||||
|
state ? "press" : "release", event->button.state));
|
||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,8 +439,11 @@ input_handle_key(void *data, struct wl_input_device *input_device,
|
|||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
|
|
||||||
fprintf (stderr, "keyboard event, code %d, sym %d, string %s, mods 0x%x\n",
|
GDK_NOTE (EVENTS,
|
||||||
code, event->key.keyval, event->key.string, event->key.state);
|
g_message ("keyboard event, code %d, sym %d, "
|
||||||
|
"string %s, mods 0x%x",
|
||||||
|
code, event->key.keyval,
|
||||||
|
event->key.string, event->key.state));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -465,6 +475,10 @@ input_handle_pointer_focus(void *data,
|
|||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS,
|
||||||
|
g_message ("leave, device %p surface %p",
|
||||||
|
device, device->pointer_focus));
|
||||||
|
|
||||||
g_object_unref(device->pointer_focus);
|
g_object_unref(device->pointer_focus);
|
||||||
device->pointer_focus = NULL;
|
device->pointer_focus = NULL;
|
||||||
}
|
}
|
||||||
@ -495,10 +509,11 @@ input_handle_pointer_focus(void *data,
|
|||||||
device->y = y;
|
device->y = y;
|
||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "pointer focus surface %p, window %p\n",
|
GDK_NOTE (EVENTS,
|
||||||
surface, device->pointer_focus);
|
g_message ("enter, device %p surface %p",
|
||||||
|
device, device->pointer_focus));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -543,6 +558,10 @@ input_handle_keyboard_focus(void *data,
|
|||||||
g_object_unref(device->pointer_focus);
|
g_object_unref(device->pointer_focus);
|
||||||
device->keyboard_focus = NULL;
|
device->keyboard_focus = NULL;
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS,
|
||||||
|
g_message ("focus out, device %p surface %p",
|
||||||
|
device, device->keyboard_focus));
|
||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,6 +578,10 @@ input_handle_keyboard_focus(void *data,
|
|||||||
|
|
||||||
update_modifiers (device, keys);
|
update_modifiers (device, keys);
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS,
|
||||||
|
g_message ("focus int, device %p surface %p",
|
||||||
|
device, device->keyboard_focus));
|
||||||
|
|
||||||
_gdk_wayland_display_deliver_event (device->display, event);
|
_gdk_wayland_display_deliver_event (device->display, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user