forked from AuroraMiddleware/gtk
wayland: Add debug spew
This commit is contained in:
parent
94c5d691df
commit
af86bc58b9
@ -571,11 +571,15 @@ emit_selection_owner_change_forall (GdkAtom atom)
|
||||
static void
|
||||
data_device_data_offer (void *data,
|
||||
struct wl_data_device *data_device,
|
||||
struct wl_data_offer *_offer)
|
||||
struct wl_data_offer *offer)
|
||||
{
|
||||
GdkWaylandDeviceData *device = (GdkWaylandDeviceData *)data;
|
||||
gdk_wayland_selection_set_offer (device->display, _offer);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("data device data offer, data device %p, offer %p",
|
||||
data_device, offer));
|
||||
|
||||
gdk_wayland_selection_set_offer (device->display, offer);
|
||||
emit_selection_owner_change_forall (gdk_atom_intern_static_string ("GdkWaylandSelection"));
|
||||
}
|
||||
|
||||
@ -596,8 +600,9 @@ data_device_enter (void *data,
|
||||
if (!GDK_IS_WINDOW (dest_window))
|
||||
return;
|
||||
|
||||
g_debug (G_STRLOC ": %s data_device = %p serial = %u, surface = %p, x = %d y = %d, offer = %p",
|
||||
G_STRFUNC, data_device, serial, surface, x, y, offer);
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("data device enter, data device %p serial %u, surface %p, x %d y %d, offer %p",
|
||||
data_device, serial, surface, x, y, offer));
|
||||
|
||||
/* Update pointer state, so device state queries work during DnD */
|
||||
device->pointer_focus = g_object_ref (dest_window);
|
||||
@ -629,8 +634,8 @@ data_device_leave (void *data,
|
||||
{
|
||||
GdkWaylandDeviceData *device = (GdkWaylandDeviceData *) data;
|
||||
|
||||
g_debug (G_STRLOC ": %s data_device = %p",
|
||||
G_STRFUNC, data_device);
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("data device leave, data device %p", data_device));
|
||||
|
||||
if (!gdk_drag_context_get_dest_window (device->drop_context))
|
||||
return;
|
||||
@ -677,8 +682,8 @@ data_device_drop (void *data,
|
||||
GdkWaylandDeviceData *device = (GdkWaylandDeviceData *) data;
|
||||
GdkWindow *local_dnd_owner;
|
||||
|
||||
g_debug (G_STRLOC ": %s data_device = %p",
|
||||
G_STRFUNC, data_device);
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("data device drop, data device %p", data_device));
|
||||
|
||||
local_dnd_owner = gdk_selection_owner_get_for_display (device->display, gdk_drag_get_selection (device->drop_context));
|
||||
|
||||
@ -701,8 +706,9 @@ data_device_selection (void *data,
|
||||
{
|
||||
GdkWaylandDeviceData *device = (GdkWaylandDeviceData *) data;
|
||||
|
||||
g_debug (G_STRLOC ": %s wl_data_device = %p wl_data_offer = %p",
|
||||
G_STRFUNC, wl_data_device, offer);
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("data device selection, data device %p, data offer %p",
|
||||
wl_data_device, offer));
|
||||
|
||||
gdk_wayland_selection_set_offer (device->display, offer);
|
||||
emit_selection_owner_change_forall (gdk_atom_intern_static_string ("CLIPBOARD"));
|
||||
@ -861,8 +867,8 @@ pointer_handle_motion (void *data,
|
||||
&event->motion.y_root);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("motion %d %d, state %d",
|
||||
sx, sy, event->button.state));
|
||||
g_message ("motion %d %d, device %p state %d",
|
||||
sx, sy, device, event->button.state));
|
||||
|
||||
_gdk_wayland_display_deliver_event (device->display, event);
|
||||
}
|
||||
@ -926,9 +932,11 @@ pointer_handle_button (void *data,
|
||||
device->modifiers &= ~modifier;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("button %d %s, state %d",
|
||||
g_message ("button %d %s, device %p state %d",
|
||||
event->button.button,
|
||||
state ? "press" : "release", event->button.state));
|
||||
state ? "press" : "release",
|
||||
device,
|
||||
event->button.state));
|
||||
|
||||
_gdk_wayland_display_deliver_event (device->display, event);
|
||||
}
|
||||
@ -982,8 +990,8 @@ pointer_handle_axis (void *data,
|
||||
&event->scroll.y_root);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("scroll %f %f",
|
||||
event->scroll.delta_x, event->scroll.delta_y));
|
||||
g_message ("scroll %f %f, device %p",
|
||||
event->scroll.delta_x, event->scroll.delta_y, device));
|
||||
|
||||
_gdk_wayland_display_deliver_event (device->display, event);
|
||||
}
|
||||
@ -1034,7 +1042,7 @@ keyboard_handle_enter (void *data,
|
||||
gdk_event_set_source_device (event, device->keyboard);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("focus int, device %p surface %p",
|
||||
g_message ("focus in, device %p surface %p",
|
||||
device, device->keyboard_focus));
|
||||
|
||||
_gdk_wayland_display_deliver_event (device->display, event);
|
||||
@ -1568,6 +1576,12 @@ seat_handle_capabilities (void *data,
|
||||
GdkWaylandDeviceData *device = data;
|
||||
GdkWaylandDeviceManager *device_manager = GDK_WAYLAND_DEVICE_MANAGER (device->device_manager);
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("seat %p with %s%s%s", seat,
|
||||
(caps & WL_SEAT_CAPABILITY_POINTER) ? " pointer, " : "",
|
||||
(caps & WL_SEAT_CAPABILITY_KEYBOARD) ? " keyboard, " : "",
|
||||
(caps & WL_SEAT_CAPABILITY_TOUCH) ? " touch" : ""));
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_POINTER) && !device->wl_pointer)
|
||||
{
|
||||
device->wl_pointer = wl_seat_get_pointer (seat);
|
||||
@ -1691,6 +1705,8 @@ seat_handle_name (void *data,
|
||||
const char *name)
|
||||
{
|
||||
/* We don't care about the name. */
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("seat %p name %s", seat, name));
|
||||
}
|
||||
|
||||
static const struct wl_seat_listener seat_listener = {
|
||||
|
@ -132,6 +132,9 @@ xdg_shell_ping (void *data,
|
||||
|
||||
_gdk_wayland_display_update_serial (wayland_display, serial);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("ping, shell %p, serial %u\n", xdg_shell, serial));
|
||||
|
||||
xdg_shell_pong (xdg_shell, serial);
|
||||
}
|
||||
|
||||
@ -151,6 +154,9 @@ gdk_registry_handle_global (void *data,
|
||||
struct wl_seat *seat;
|
||||
struct wl_output *output;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("add global %u, interface %s, version %u", id, interface, version));
|
||||
|
||||
if (strcmp (interface, "wl_compositor") == 0)
|
||||
{
|
||||
display_wayland->compositor =
|
||||
@ -209,6 +215,7 @@ gdk_registry_handle_global_remove (void *data,
|
||||
GdkWaylandDisplay *display_wayland = data;
|
||||
GdkDisplay *display = GDK_DISPLAY (display_wayland);
|
||||
|
||||
GDK_NOTE (MISC, g_message ("remove global %u", id));
|
||||
_gdk_wayland_device_manager_remove_seat (display->device_manager, id);
|
||||
_gdk_wayland_screen_remove_output (display_wayland->screen, id);
|
||||
|
||||
@ -233,6 +240,8 @@ _gdk_wayland_display_open (const gchar *display_name)
|
||||
GdkDisplay *display;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));
|
||||
|
||||
/* If this variable is unset then wayland initialisation will surely
|
||||
* fail, logging a fatal error in the process. Save ourselves from
|
||||
* that.
|
||||
|
@ -316,6 +316,9 @@ frame_callback (void *data,
|
||||
GdkFrameClock *clock = gdk_window_get_frame_clock (window);
|
||||
GdkFrameTimings *timings;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("frame %p", window));
|
||||
|
||||
wl_callback_destroy (callback);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@ -796,6 +799,9 @@ surface_enter (void *data,
|
||||
GdkWindow *window = GDK_WINDOW (data);
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("surface enter, window %p output %p", window, output));
|
||||
|
||||
impl->outputs = g_slist_prepend (impl->outputs, output);
|
||||
|
||||
window_update_scale (window);
|
||||
@ -809,6 +815,9 @@ surface_leave (void *data,
|
||||
GdkWindow *window = GDK_WINDOW (data);
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("surface leave, window %p output %p", window, output));
|
||||
|
||||
impl->outputs = g_slist_remove (impl->outputs, output);
|
||||
|
||||
window_update_scale (window);
|
||||
@ -914,6 +923,13 @@ xdg_surface_configure (void *data,
|
||||
}
|
||||
}
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("configure, window %p %dx%d,%s%s%s",
|
||||
window, width, height,
|
||||
(new_state & GDK_WINDOW_STATE_FULLSCREEN) ? " fullscreen" : "",
|
||||
(new_state & GDK_WINDOW_STATE_MAXIMIZED) ? " maximized" : "",
|
||||
(new_state & GDK_WINDOW_STATE_FOCUSED) ? " focused" : ""));
|
||||
|
||||
_gdk_set_window_state (window, new_state);
|
||||
gdk_wayland_window_sync_margin (window);
|
||||
xdg_surface_ack_configure (xdg_surface, serial);
|
||||
@ -927,6 +943,9 @@ xdg_surface_close (void *data,
|
||||
GdkDisplay *display;
|
||||
GdkEvent *event;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("close %p", window));
|
||||
|
||||
event = gdk_event_new (GDK_DELETE);
|
||||
event->any.window = g_object_ref (window);
|
||||
event->any.send_event = TRUE;
|
||||
@ -967,6 +986,9 @@ xdg_popup_done (void *data,
|
||||
{
|
||||
GdkWindow *window = GDK_WINDOW (data);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("done %p", window));
|
||||
|
||||
gdk_window_hide (window);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user