#define BTN_STYLUS3 0x149 /* Linux 4.15 */
#endif
-#define GDK_SEAT_NOTE(seat,type,action) GDK_DISPLAY_NOTE(gdk_seat_get_display (GDK_SEAT (seat)),type,action)
+#define GDK_SEAT_DEBUG(seat,type,...) GDK_DISPLAY_DEBUG(gdk_seat_get_display (GDK_SEAT (seat)),type,__VA_ARGS__)
typedef struct _GdkWaylandDevicePad GdkWaylandDevicePad;
typedef struct _GdkWaylandDevicePadClass GdkWaylandDevicePadClass;
if (seat->pending_offer != offer)
{
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("%p: offer for unknown offer %p of %s",
- seat, offer, type));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "%p: offer for unknown offer %p of %s",
+ seat, offer, type);
return;
}
{
GdkWaylandSeat *seat = data;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("data device data offer, data device %p, offer %p",
- data_device, offer));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "data device data offer, data device %p, offer %p",
+ data_device, offer);
gdk_wayland_seat_discard_pending_offer (seat);
if (offer != seat->pending_offer)
{
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("%p: enter event for unknown offer %p, expected %p",
- seat, offer, seat->pending_offer));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "%p: enter event for unknown offer %p, expected %p",
+ seat, offer, seat->pending_offer);
return;
}
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("data device enter, data device %p serial %u, surface %p, x %f y %f, offer %p",
- data_device, serial, surface, wl_fixed_to_double (x), wl_fixed_to_double (y), offer));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "data device enter, data device %p serial %u, surface %p, x %f y %f, offer %p",
+ data_device, serial, surface, wl_fixed_to_double (x), wl_fixed_to_double (y), offer);
/* Update pointer state, so device state queries work during DnD */
seat->pointer_info.focus = g_object_ref (dest_surface);
{
GdkWaylandSeat *seat = data;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("data device leave, data device %p", data_device));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "data device leave, data device %p", data_device);
if (seat->drop == NULL)
return;
GdkWaylandSeat *seat = data;
int origin_x, origin_y;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("data device motion, data_device = %p, time = %d, x = %f, y = %f",
- data_device, time, wl_fixed_to_double (x), wl_fixed_to_double (y)));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "data device motion, data_device = %p, time = %d, x = %f, y = %f",
+ data_device, time, wl_fixed_to_double (x), wl_fixed_to_double (y));
if (seat->drop == NULL)
return;
GdkWaylandSeat *seat = data;
int origin_x, origin_y;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("data device drop, data device %p", data_device));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "data device drop, data device %p", data_device);
gdk_surface_get_origin (gdk_drop_get_surface (seat->drop), &origin_x, &origin_y);
gdk_wayland_device_update_surface_cursor (seat->logical_pointer);
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("enter, seat %p surface %p",
- seat, seat->pointer_info.focus));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "enter, seat %p surface %p",
+ seat, seat->pointer_info.focus);
if (display_wayland->seat_version < WL_POINTER_HAS_FRAME)
gdk_wayland_seat_flush_frame_event (seat);
gdk_wayland_device_update_surface_cursor (seat->logical_pointer);
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("leave, seat %p surface %p",
- seat, seat->pointer_info.focus));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "leave, seat %p surface %p",
+ seat, seat->pointer_info.focus);
g_object_unref (seat->pointer_info.focus);
seat->pointer_info.focus = NULL;
else
seat->pointer_info.button_modifiers &= ~modifier;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("button %d %s, seat %p state %d",
- gdk_button_event_get_button (event),
- state ? "press" : "release",
- seat,
- gdk_event_get_modifier_state (event)));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "button %d %s, seat %p state %d",
+ gdk_button_event_get_button (event),
+ state ? "press" : "release",
+ seat,
+ gdk_event_get_modifier_state (event));
if (display->seat_version < WL_POINTER_HAS_FRAME)
gdk_wayland_seat_flush_frame_event (seat);
seat->pointer_info.time = time;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("scroll, axis %s, value %f, seat %p",
- get_axis_name (axis), wl_fixed_to_double (value),
- seat));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "scroll, axis %s, value %f, seat %p",
+ get_axis_name (axis), wl_fixed_to_double (value),
+ seat);
if (display->seat_version < WL_POINTER_HAS_FRAME)
gdk_wayland_seat_flush_frame_event (seat);
{
GdkWaylandSeat *seat = data;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("frame, seat %p", seat));
+ GDK_SEAT_DEBUG (seat, EVENTS, "frame, seat %p", seat);
gdk_wayland_seat_flush_frame_event (seat);
}
pointer_frame->source = source;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("axis source %s, seat %p", get_axis_source_name (source), seat));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "axis source %s, seat %p", get_axis_source_name (source), seat);
}
static void
pointer_frame->is_scroll_stop = TRUE;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("axis %s stop, seat %p", get_axis_name (axis), seat));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "axis %s stop, seat %p", get_axis_name (axis), seat);
}
static void
g_return_if_reached ();
}
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("discrete scroll, axis %s, value %d, seat %p",
- get_axis_name (axis), value, seat));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "discrete scroll, axis %s, value %d, seat %p",
+ get_axis_name (axis), value, seat);
}
static void
g_return_if_reached ();
}
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("value120 scroll, axis %s, value %d, seat %p",
- get_axis_name (axis), value, seat));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "value120 scroll, axis %s, value %d, seat %p",
+ get_axis_name (axis), value, seat);
}
static int
_gdk_wayland_keymap_update_from_fd (seat->keymap, format, fd, size);
- GDK_DISPLAY_NOTE(seat->keymap->display, INPUT,
+#ifdef G_ENABLE_DEBUG
+ if (GDK_DISPLAY_DEBUG_CHECK (seat->keymap->display, INPUT))
{
GString *s = g_string_new ("");
struct xkb_keymap *xkb_keymap = _gdk_wayland_keymap_get_xkb_keymap (seat->keymap);
g_string_append (s, "*");
g_string_append (s, xkb_keymap_layout_get_name (xkb_keymap, i));
}
- g_print ("layouts: %s\n", s->str);
+ gdk_debug_message ("layouts: %s", s->str);
g_string_free (s, TRUE);
- });
+ }
+#endif
g_signal_emit_by_name (seat->keymap, "keys-changed");
g_signal_emit_by_name (seat->keymap, "state-changed");
seat->logical_keyboard,
TRUE);
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("focus in, seat %p surface %p",
- seat, seat->keyboard_focus));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "focus in, seat %p surface %p",
+ seat, seat->keyboard_focus);
_gdk_wayland_display_deliver_event (seat->display, event);
}
seat->repeat_key = 0;
seat->key_modifiers = 0;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("focus out, seat %p surface %p",
- seat, gdk_event_get_surface (event)));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "focus out, seat %p surface %p",
+ seat, gdk_event_get_surface (event));
_gdk_wayland_display_deliver_event (seat->display, event);
}
_gdk_wayland_display_deliver_event (seat->display, event);
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("keyboard %s event%s, surface %p, code %d, sym %d, "
- "mods 0x%x, consumed 0x%x, layout %d level %d",
- (state ? "press" : "release"),
- (from_key_repeat ? " (repeat)" : ""),
- gdk_event_get_surface (event),
- gdk_key_event_get_keycode (event),
- gdk_key_event_get_keyval (event),
- gdk_event_get_modifier_state (event),
- gdk_key_event_get_consumed_modifiers (event),
- gdk_key_event_get_layout (event),
- gdk_key_event_get_level (event)));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "keyboard %s event%s, surface %p, code %d, sym %d, "
+ "mods 0x%x, consumed 0x%x, layout %d level %d",
+ (state ? "press" : "release"),
+ (from_key_repeat ? " (repeat)" : ""),
+ gdk_event_get_surface (event),
+ gdk_key_event_get_keycode (event),
+ gdk_key_event_get_keyval (event),
+ gdk_event_get_modifier_state (event),
+ gdk_key_event_get_consumed_modifiers (event),
+ gdk_key_event_get_layout (event),
+ gdk_key_event_get_level (event));
if (!xkb_keymap_key_repeats (xkb_keymap, key))
return;
g_signal_emit_by_name (keymap, "state-changed");
if (layout != get_active_layout (keymap))
{
- GDK_DISPLAY_NOTE(keymap->display, INPUT, g_print ("active layout now: %s\n", get_active_layout_name (keymap)));
+ GDK_DISPLAY_DEBUG (keymap->display, INPUT, "active layout now: %s", get_active_layout_name (keymap));
g_signal_emit_by_name (keymap, "keys-changed");
}
g_hash_table_iter_remove (&iter);
}
- GDK_SEAT_NOTE (seat, EVENTS, g_message ("touch cancel"));
+ GDK_SEAT_DEBUG (seat, EVENTS, "touch cancel");
}
static void
GdkWaylandSeat *seat = data;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
- GDK_SEAT_NOTE (seat, MISC,
- g_message ("seat %p with %s%s%s", wl_seat,
- (caps & WL_SEAT_CAPABILITY_POINTER) ? " pointer, " : "",
- (caps & WL_SEAT_CAPABILITY_KEYBOARD) ? " keyboard, " : "",
- (caps & WL_SEAT_CAPABILITY_TOUCH) ? " touch" : ""));
+ GDK_SEAT_DEBUG (seat, MISC,
+ "seat %p with %s%s%s", wl_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) && !seat->wl_pointer)
{
const char *name)
{
/* We don't care about the name. */
- GDK_SEAT_NOTE (GDK_WAYLAND_SEAT (data), MISC,
- g_message ("seat %p name %s", seat, name));
+ GDK_SEAT_DEBUG (GDK_WAYLAND_SEAT (data), MISC,
+ "seat %p name %s", seat, name);
}
static const struct wl_seat_listener seat_listener = {
gdk_wayland_surface_get_wl_output (surface));
pointer_surface_update_scale (tablet->logical_device);
- GDK_SEAT_NOTE (tablet->seat, EVENTS,
- g_message ("proximity in, seat %p surface %p tool %d",
- tablet->seat, tablet->pointer_info.focus,
- gdk_device_tool_get_tool_type (tool->tool)));
+ GDK_SEAT_DEBUG (tablet->seat, EVENTS,
+ "proximity in, seat %p surface %p tool %d",
+ tablet->seat, tablet->pointer_info.focus,
+ gdk_device_tool_get_tool_type (tool->tool));
}
static void
if (!tablet)
return;
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("proximity out, seat %p, tool %d", tool->seat,
- gdk_device_tool_get_tool_type (tool->tool)));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "proximity out, seat %p, tool %d", tool->seat,
+ gdk_device_tool_get_tool_type (tool->tool));
event = gdk_proximity_event_new (GDK_PROXIMITY_OUT,
tablet->pointer_info.focus,
tablet->pointer_info.surface_x = wl_fixed_to_double (sx);
tablet->pointer_info.surface_y = wl_fixed_to_double (sy);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet motion %f %f",
- tablet->pointer_info.surface_x,
- tablet->pointer_info.surface_y));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet motion %f %f",
+ tablet->pointer_info.surface_x,
+ tablet->pointer_info.surface_y);
event = gdk_motion_event_new (tablet->pointer_info.focus,
tablet->logical_device,
_gdk_device_translate_axis (tablet->stylus_device, axis_index,
pressure, &tablet->axes[GDK_AXIS_PRESSURE]);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet tool %d pressure %d",
- gdk_device_tool_get_tool_type (tool->tool), pressure));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet tool %d pressure %d",
+ gdk_device_tool_get_tool_type (tool->tool), pressure);
}
static void
_gdk_device_translate_axis (tablet->stylus_device, axis_index,
distance, &tablet->axes[GDK_AXIS_DISTANCE]);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet tool %d distance %d",
- gdk_device_tool_get_tool_type (tool->tool), distance));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet tool %d distance %d",
+ gdk_device_tool_get_tool_type (tool->tool), distance);
}
static void
wl_fixed_to_double (ytilt),
&tablet->axes[GDK_AXIS_YTILT]);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet tool %d tilt %f/%f",
- gdk_device_tool_get_tool_type (tool->tool),
- wl_fixed_to_double (xtilt), wl_fixed_to_double (ytilt)));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet tool %d tilt %f/%f",
+ gdk_device_tool_get_tool_type (tool->tool),
+ wl_fixed_to_double (xtilt), wl_fixed_to_double (ytilt));
}
static void
wl_fixed_to_double (degrees),
&tablet->axes[GDK_AXIS_ROTATION]);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet tool %d rotation %f",
- gdk_device_tool_get_tool_type (tool->tool),
- wl_fixed_to_double (degrees)));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet tool %d rotation %f",
+ gdk_device_tool_get_tool_type (tool->tool),
+ wl_fixed_to_double (degrees));
}
static void
_gdk_device_translate_axis (tablet->stylus_device, axis_index,
position, &tablet->axes[GDK_AXIS_SLIDER]);
- GDK_SEAT_NOTE (tool->seat, EVENTS,
- g_message ("tablet tool %d slider %d",
- gdk_device_tool_get_tool_type (tool->tool), position));
+ GDK_SEAT_DEBUG (tool->seat, EVENTS,
+ "tablet tool %d slider %d",
+ gdk_device_tool_get_tool_type (tool->tool), position);
}
static void
seat = GDK_WAYLAND_SEAT (tablet->seat);
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("tablet tool %d wheel %d/%d",
- gdk_device_tool_get_tool_type (tool->tool), degrees, clicks));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "tablet tool %d wheel %d/%d",
+ gdk_device_tool_get_tool_type (tool->tool), degrees, clicks);
if (clicks == 0)
return;
if (!tablet)
return;
- GDK_SEAT_NOTE (tablet->seat, EVENTS,
- g_message ("tablet frame, time %d", time));
+ GDK_SEAT_DEBUG (tablet->seat, EVENTS,
+ "tablet frame, time %d", time);
frame_event = tablet->pointer_info.frame.event;
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad ring handle source, ring = %p source = %d",
- wp_tablet_pad_ring, source));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad ring handle source, ring = %p source = %d",
+ wp_tablet_pad_ring, source);
group->axis_tmp_info.source = source;
}
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad ring handle angle, ring = %p angle = %f",
- wp_tablet_pad_ring, wl_fixed_to_double (angle)));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad ring handle angle, ring = %p angle = %f",
+ wp_tablet_pad_ring, wl_fixed_to_double (angle));
group->axis_tmp_info.value = wl_fixed_to_double (angle);
}
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad ring handle stop, ring = %p", wp_tablet_pad_ring));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad ring handle stop, ring = %p", wp_tablet_pad_ring);
group->axis_tmp_info.is_stop = TRUE;
}
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GdkEvent *event;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("tablet pad ring handle frame, ring = %p", wp_tablet_pad_ring));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "tablet pad ring handle frame, ring = %p", wp_tablet_pad_ring);
event = gdk_pad_event_new_ring (seat->keyboard_focus,
pad->device,
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad strip handle source, strip = %p source = %d",
- wp_tablet_pad_strip, source));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad strip handle source, strip = %p source = %d",
+ wp_tablet_pad_strip, source);
group->axis_tmp_info.source = source;
}
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad strip handle position, strip = %p position = %d",
- wp_tablet_pad_strip, position));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad strip handle position, strip = %p position = %d",
+ wp_tablet_pad_strip, position);
group->axis_tmp_info.value = (double) position / 65535;
}
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad strip handle stop, strip = %p",
- wp_tablet_pad_strip));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad strip handle stop, strip = %p",
+ wp_tablet_pad_strip);
group->axis_tmp_info.is_stop = TRUE;
}
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GdkEvent *event;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("tablet pad strip handle frame, strip = %p",
- wp_tablet_pad_strip));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "tablet pad strip handle frame, strip = %p",
+ wp_tablet_pad_strip);
event = gdk_pad_event_new_strip (seat->keyboard_focus,
pad->device,
GdkWaylandTabletPadGroupData *group = data;
uint32_t *p;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad group handle buttons, pad group = %p, n_buttons = %" G_GSIZE_FORMAT,
- wp_tablet_pad_group, buttons->size));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad group handle buttons, pad group = %p, n_buttons = %" G_GSIZE_FORMAT,
+ wp_tablet_pad_group, buttons->size);
wl_array_for_each (p, buttons)
{
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad group handle ring, pad group = %p, ring = %p",
- wp_tablet_pad_group, wp_tablet_pad_ring));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad group handle ring, pad group = %p, ring = %p",
+ wp_tablet_pad_group, wp_tablet_pad_ring);
zwp_tablet_pad_ring_v2_add_listener (wp_tablet_pad_ring,
&tablet_pad_ring_listener, group);
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad group handle strip, pad group = %p, strip = %p",
- wp_tablet_pad_group, wp_tablet_pad_strip));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad group handle strip, pad group = %p, strip = %p",
+ wp_tablet_pad_group, wp_tablet_pad_strip);
zwp_tablet_pad_strip_v2_add_listener (wp_tablet_pad_strip,
&tablet_pad_strip_listener, group);
{
GdkWaylandTabletPadGroupData *group = data;
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad group handle modes, pad group = %p, n_modes = %d",
- wp_tablet_pad_group, modes));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad group handle modes, pad group = %p, n_modes = %d",
+ wp_tablet_pad_group, modes);
group->n_modes = modes;
}
GdkWaylandTabletPadGroupData *group = data;
#endif
- GDK_SEAT_NOTE (group->pad->seat, EVENTS,
- g_message ("tablet pad group handle done, pad group = %p",
- wp_tablet_pad_group));
+ GDK_SEAT_DEBUG (group->pad->seat, EVENTS,
+ "tablet pad group handle done, pad group = %p",
+ wp_tablet_pad_group);
}
static void
GdkEvent *event;
guint n_group;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("tablet pad group handle mode, pad group = %p, mode = %d",
- wp_tablet_pad_group, mode));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "tablet pad group handle mode, pad group = %p, mode = %d",
+ wp_tablet_pad_group, mode);
group->mode_switch_serial = serial;
group->current_mode = mode;
GdkWaylandTabletPadData *pad = data;
GdkWaylandTabletPadGroupData *group;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle group, pad group = %p, group = %p",
- wp_tablet_pad_group, wp_tablet_pad_group));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle group, pad group = %p, group = %p",
+ wp_tablet_pad_group, wp_tablet_pad_group);
group = g_new0 (GdkWaylandTabletPadGroupData, 1);
group->wp_tablet_pad_group = wp_tablet_pad_group;
{
GdkWaylandTabletPadData *pad = data;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle path, pad = %p, path = %s",
- wp_tablet_pad, path));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle path, pad = %p, path = %s",
+ wp_tablet_pad, path);
pad->path = g_strdup (path);
}
{
GdkWaylandTabletPadData *pad = data;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle buttons, pad = %p, n_buttons = %d",
- wp_tablet_pad, buttons));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle buttons, pad = %p, n_buttons = %d",
+ wp_tablet_pad, buttons);
pad->n_buttons = buttons;
}
{
GdkWaylandTabletPadData *pad = data;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle done, pad = %p", wp_tablet_pad));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle done, pad = %p", wp_tablet_pad);
pad->device =
g_object_new (GDK_TYPE_WAYLAND_DEVICE_PAD,
GdkEvent *event;
int n_group;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle button, pad = %p, button = %d, state = %d",
- wp_tablet_pad, button, state));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle button, pad = %p, button = %d, state = %d",
+ wp_tablet_pad, button, state);
group = tablet_pad_lookup_button_group (pad, button);
GdkWaylandTabletPadData *pad = data;
GdkWaylandTabletData *tablet = zwp_tablet_v2_get_user_data (wp_tablet);
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle enter, pad = %p, tablet = %p surface = %p",
- wp_tablet_pad, wp_tablet, surface));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle enter, pad = %p, tablet = %p surface = %p",
+ wp_tablet_pad, wp_tablet, surface);
/* Relate pad and tablet */
tablet->pads = g_list_prepend (tablet->pads, pad);
{
GdkWaylandTabletPadData *pad = data;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle leave, pad = %p, surface = %p",
- wp_tablet_pad, surface));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle leave, pad = %p, surface = %p",
+ wp_tablet_pad, surface);
if (pad->current_tablet)
{
{
GdkWaylandTabletPadData *pad = data;
- GDK_SEAT_NOTE (pad->seat, EVENTS,
- g_message ("tablet pad handle removed, pad = %p", wp_tablet_pad));
+ GDK_SEAT_DEBUG (pad->seat, EVENTS,
+ "tablet pad handle removed, pad = %p", wp_tablet_pad);
/* Remove from the current tablet */
if (pad->current_tablet)
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
GdkWaylandTabletData *tablet;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("pointer surface of seat %p entered output %p",
- seat, output));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "pointer surface of seat %p entered output %p",
+ seat, output);
tablet = gdk_wayland_seat_find_tablet (seat, device);
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
GdkWaylandTabletData *tablet;
- GDK_SEAT_NOTE (seat, EVENTS,
- g_message ("pointer surface of seat %p left output %p",
- seat, output));
+ GDK_SEAT_DEBUG (seat, EVENTS,
+ "pointer surface of seat %p left output %p",
+ seat, output);
tablet = gdk_wayland_seat_find_tablet (seat, device);
struct xdg_wm_base *xdg_wm_base,
uint32_t serial)
{
- GDK_NOTE (EVENTS,
- g_message ("ping, shell %p, serial %u\n", xdg_wm_base, serial));
+ GDK_DEBUG (EVENTS, "ping, shell %p, serial %u", xdg_wm_base, serial);
xdg_wm_base_pong (xdg_wm_base, serial);
}
struct zxdg_shell_v6 *xdg_shell,
uint32_t serial)
{
- GDK_DISPLAY_NOTE (GDK_DISPLAY (data), EVENTS,
- g_message ("ping, shell %p, serial %u\n", xdg_shell, serial));
+ GDK_DISPLAY_DEBUG (GDK_DISPLAY (data), EVENTS,
+ "ping, shell %p, serial %u", xdg_shell, serial);
zxdg_shell_v6_pong (xdg_shell, serial);
}
struct wl_shm *wl_shm,
uint32_t format)
{
- GDK_NOTE (MISC,
- char buf[10];
- g_message ("supported pixel format %s (0x%X)", get_format_name (format, buf), (guint) format);
- );
+#ifdef G_ENABLE_DEBUG
+ char buf[10];
+#endif
+
+ GDK_DEBUG (MISC, "supported pixel format %s (0x%X)",
+ get_format_name (format, buf), (guint) format);
}
static const struct wl_shm_listener wl_shm_listener = {
uint32_t mode)
{
g_assert (mode <= ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER);
+#ifdef G_ENABLE_DEBUG
const char *modes[] = {
[ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE] = "none",
[ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_CLIENT] = "client",
[ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER] = "server",
};
+#endif
GdkWaylandDisplay *display_wayland = data;
- g_debug ("Compositor prefers decoration mode '%s'", modes[mode]);
+ GDK_DISPLAY_DEBUG (GDK_DISPLAY (data), MISC, "Compositor prefers decoration mode '%s'", modes[mode]);
display_wayland->server_decoration_mode = mode;
}
GdkWaylandDisplay *display_wayland = data;
struct wl_output *output;
- GDK_NOTE (MISC,
- g_message ("add global %u, interface %s, version %u", id, interface, version));
+ GDK_DEBUG (MISC, "add global %u, interface %s, version %u", id, interface, version);
if (strcmp (interface, "wl_compositor") == 0)
{
{
GdkWaylandDisplay *display_wayland = data;
- GDK_NOTE (MISC, g_message ("remove global %u", id));
+ GDK_DEBUG (MISC, "remove global %u", id);
+
_gdk_wayland_display_remove_seat (display_wayland, id);
gdk_wayland_display_remove_output (display_wayland, id);
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
- GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));
+ GDK_DEBUG (MISC, "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
{
guint i, n;
- GDK_NOTE (MISC,
- g_message ("init xdg-output support, %d monitor(s) already present",
- g_list_model_get_n_items (G_LIST_MODEL (self->monitors))));
+ GDK_DEBUG (MISC, "init xdg-output support, %d monitor(s) already present",
+ g_list_model_get_n_items (G_LIST_MODEL (self->monitors)));
n = g_list_model_get_n_items (G_LIST_MODEL (self->monitors));
for (i = 0; i < n; i++)
static void
apply_monitor_change (GdkWaylandMonitor *monitor)
{
- GDK_NOTE (MISC,
- g_message ("monitor %d changed position %d %d, size %d %d",
- monitor->id,
- monitor->x, monitor->y,
- monitor->width, monitor->height));
+ GDK_DEBUG (MISC, "monitor %d changed position %d %d, size %d %d",
+ monitor->id,
+ monitor->x, monitor->y,
+ monitor->width, monitor->height);
gdk_monitor_set_geometry (GDK_MONITOR (monitor),
&(GdkRectangle) {
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
- GDK_NOTE (MISC,
- g_message ("handle logical position xdg-output %d, position %d %d",
- monitor->id, x, y));
+ GDK_DEBUG (MISC, "handle logical position xdg-output %d, position %d %d",
+ monitor->id, x, y);
+
monitor->x = x;
monitor->y = y;
}
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
- GDK_NOTE (MISC,
- g_message ("handle logical size xdg-output %d, size %d %d",
- monitor->id, width, height));
+ GDK_DEBUG (MISC, "handle logical size xdg-output %d, size %d %d",
+ monitor->id, width, height);
+
monitor->width = width;
monitor->height = height;
}
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
- GDK_NOTE (MISC,
- g_message ("handle done xdg-output %d", monitor->id));
+ GDK_DEBUG (MISC, "handle done xdg-output %d", monitor->id);
monitor->xdg_output_done = TRUE;
if (monitor->wl_output_done && should_expect_xdg_output_done (monitor))
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
- GDK_NOTE (MISC,
- g_message ("handle name xdg-output %d", monitor->id));
+ GDK_DEBUG (MISC, "handle name xdg-output %d", monitor->id);
monitor->name = g_strdup (name);
}
struct zxdg_output_v1 *xdg_output,
const char *description)
{
- GDK_NOTE (MISC,
- {
- GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
- g_message ("handle description xdg-output %d", monitor->id);
- });
+ GDK_DEBUG (MISC, "handle description xdg-output %d",
+ ((GdkWaylandMonitor *)data)->id);
}
static const struct zxdg_output_v1_listener xdg_output_listener = {
GdkDisplay *display = GDK_MONITOR (monitor)->display;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
- GDK_NOTE (MISC,
- g_message ("get xdg-output for monitor %d", monitor->id));
+ GDK_DEBUG (MISC, "get xdg-output for monitor %d", monitor->id);
monitor->xdg_output =
zxdg_output_manager_v1_get_xdg_output (display_wayland->xdg_output_manager,
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
- GDK_NOTE (MISC,
- g_message ("handle geometry output %d, position %d %d, phys. size %d %d, subpixel layout %s, manufacturer %s, model %s, transform %s",
- monitor->id, x, y, physical_width, physical_height, subpixel_to_string (subpixel), make, model, transform_to_string (transform)));
+ GDK_DEBUG (MISC, "handle geometry output %d, position %d %d, phys. size %d %d, subpixel layout %s, manufacturer %s, model %s, transform %s",
+ monitor->id, x, y,
+ physical_width, physical_height,
+ subpixel_to_string (subpixel),
+ make, model,
+ transform_to_string (transform));
monitor->x = x;
monitor->y = y;
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
- GDK_NOTE (MISC,
- g_message ("handle done output %d", monitor->id));
+ GDK_DEBUG (MISC, "handle done output %d", monitor->id);
monitor->wl_output_done = TRUE;
int width;
int height;
- GDK_NOTE (MISC,
- g_message ("handle scale output %d, scale %d", monitor->id, scale));
+ GDK_DEBUG (MISC, "handle scale output %d, scale %d", monitor->id, scale);
gdk_monitor_get_geometry (GDK_MONITOR (monitor), &previous_geometry);
previous_scale = gdk_monitor_get_scale_factor (GDK_MONITOR (monitor));
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
int scale;
- GDK_NOTE (MISC,
- g_message ("handle mode output %d, size %d %d, rate %d",
- monitor->id, width, height, refresh));
+ GDK_DEBUG (MISC, "handle mode output %d, size %d %d, rate %d",
+ monitor->id, width, height, refresh);
if ((flags & WL_OUTPUT_MODE_CURRENT) == 0)
return;
wl_output_add_listener (output, &output_listener, monitor);
- GDK_NOTE (MISC,
- g_message ("xdg_output_manager %p",
- display_wayland->xdg_output_manager));
+ GDK_DEBUG (MISC, "xdg_output_manager %p",
+ display_wayland->xdg_output_manager);
if (display_has_xdg_output_support (display_wayland))
gdk_wayland_display_get_xdg_output (monitor);