Make gdk logging per-display

As far as possible, use per-display debug flags.

This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
This commit is contained in:
Matthias Clasen 2018-01-11 19:48:27 -05:00
parent c5fc841285
commit e151058dff
32 changed files with 412 additions and 353 deletions

View File

@ -22,10 +22,6 @@ void gdk_window_thaw_toplevel_updates (GdkWindow *window);
gboolean gdk_window_supports_edge_constraints (GdkWindow *window); gboolean gdk_window_supports_edge_constraints (GdkWindow *window);
GdkDebugFlags gdk_display_get_debug_flags (GdkDisplay *display);
void gdk_display_set_debug_flags (GdkDisplay *display,
GdkDebugFlags flags);
void gdk_window_move_to_rect (GdkWindow *window, void gdk_window_move_to_rect (GdkWindow *window,
const GdkRectangle *rect, const GdkRectangle *rect,
GdkGravity rect_anchor, GdkGravity rect_anchor,

View File

@ -1505,7 +1505,7 @@ gdk_display_make_gl_context_current (GdkDisplay *display,
GdkDebugFlags GdkDebugFlags
gdk_display_get_debug_flags (GdkDisplay *display) gdk_display_get_debug_flags (GdkDisplay *display)
{ {
return display->debug_flags; return display ? display->debug_flags : _gdk_debug_flags;
} }
void void

View File

@ -455,6 +455,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
cairo_region_t *region) cairo_region_t *region)
{ {
GdkGLContext *paint_context; GdkGLContext *paint_context;
GdkDisplay *display;
cairo_surface_t *image; cairo_surface_t *image;
double device_x_offset, device_y_offset; double device_x_offset, device_y_offset;
cairo_rectangle_int_t rect, e; cairo_rectangle_int_t rect, e;
@ -469,8 +470,13 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
guint target; guint target;
paint_context = gdk_gl_context_get_current (); paint_context = gdk_gl_context_get_current ();
if (GDK_DEBUG_CHECK (GL_SOFTWARE) == 0 && if (paint_context)
paint_context && display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (paint_context));
else
display = NULL;
if (paint_context &&
GDK_DISPLAY_DEBUG_CHECK (display, GL_SOFTWARE) == 0 &&
GDK_GL_CONTEXT_GET_CLASS (paint_context)->texture_from_surface && GDK_GL_CONTEXT_GET_CLASS (paint_context)->texture_from_surface &&
GDK_GL_CONTEXT_GET_CLASS (paint_context)->texture_from_surface (paint_context, surface, region)) GDK_GL_CONTEXT_GET_CLASS (paint_context)->texture_from_surface (paint_context, surface, region))
return; return;

View File

@ -555,6 +555,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
int minor) int minor)
{ {
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
GdkDisplay *display;
int version, min_ver; int version, min_ver;
g_return_if_fail (GDK_IS_GL_CONTEXT (context)); g_return_if_fail (GDK_IS_GL_CONTEXT (context));
@ -571,7 +572,9 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
/* Enforce a minimum context version number of 3.2 */ /* Enforce a minimum context version number of 3.2 */
version = (major * 100) + minor; version = (major * 100) + minor;
if (priv->use_es > 0 || GDK_DEBUG_CHECK (GL_GLES)) display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
if (priv->use_es > 0 || GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES))
min_ver = 200; min_ver = 200;
else else
min_ver = 302; min_ver = 302;
@ -602,12 +605,15 @@ gdk_gl_context_get_required_version (GdkGLContext *context,
int *minor) int *minor)
{ {
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
GdkDisplay *display;
int default_major, default_minor; int default_major, default_minor;
int maj, min; int maj, min;
g_return_if_fail (GDK_IS_GL_CONTEXT (context)); g_return_if_fail (GDK_IS_GL_CONTEXT (context));
if (priv->use_es > 0 || GDK_DEBUG_CHECK (GL_GLES)) display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
if (priv->use_es > 0 || GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES))
{ {
default_major = 2; default_major = 2;
default_minor = 0; default_minor = 0;
@ -769,6 +775,7 @@ static void
gdk_gl_context_check_extensions (GdkGLContext *context) gdk_gl_context_check_extensions (GdkGLContext *context)
{ {
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
GdkDisplay *display;
gboolean has_npot, has_texture_rectangle; gboolean has_npot, has_texture_rectangle;
if (!priv->realized) if (!priv->realized)
@ -812,7 +819,9 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
priv->is_legacy = TRUE; priv->is_legacy = TRUE;
} }
if (!priv->use_es && GDK_DEBUG_CHECK (GL_TEXTURE_RECT)) display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
if (!priv->use_es && GDK_DISPLAY_DEBUG_CHECK (display, GL_TEXTURE_RECT))
priv->use_texture_rectangle = TRUE; priv->use_texture_rectangle = TRUE;
else if (has_npot) else if (has_npot)
priv->use_texture_rectangle = FALSE; priv->use_texture_rectangle = FALSE;
@ -821,8 +830,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
else else
g_warning ("GL implementation doesn't support any form of non-power-of-two textures"); g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("%s version: %d.%d (%s)\n" g_message ("%s version: %d.%d (%s)\n"
"* GLSL version: %s\n" "* GLSL version: %s\n"
"* Extensions checked:\n" "* Extensions checked:\n"
" - GL_ARB_texture_non_power_of_two: %s\n" " - GL_ARB_texture_non_power_of_two: %s\n"

View File

@ -87,25 +87,28 @@ extern GdkWindow *_gdk_parent_root;
extern guint _gdk_debug_flags; extern guint _gdk_debug_flags;
GdkDebugFlags gdk_display_get_debug_flags (GdkDisplay *display);
void gdk_display_set_debug_flags (GdkDisplay *display,
GdkDebugFlags flags);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
#define GDK_DEBUG_CHECK(type) G_UNLIKELY (_gdk_debug_flags & GDK_DEBUG_##type) #define GDK_DISPLAY_DEBUG_CHECK(display,type) \
G_UNLIKELY (gdk_display_get_debug_flags (display) & GDK_DEBUG_##type)
#define GDK_NOTE(type,action) G_STMT_START { \ #define GDK_DISPLAY_NOTE(display,type,action) G_STMT_START { \
if (GDK_DEBUG_CHECK (type)) \ if (GDK_DISPLAY_DEBUG_CHECK (display,type)) \
{ action; }; } G_STMT_END { action; }; } G_STMT_END
#define GDK_DISPLAY_DEBUG_CHECK(display,type) G_UNLIKELY(gdk_display_get_debug_flags (display) & GDK_DEBUG_##type)
#else /* !G_ENABLE_DEBUG */ #else /* !G_ENABLE_DEBUG */
#define GDK_DEBUG_CHECK(type) 0
#define GDK_NOTE(type,action)
#define GDK_DISPLAY_DEBUG_CHECK(display,type) 0 #define GDK_DISPLAY_DEBUG_CHECK(display,type) 0
#define GDK_DISPLAY_NOTE(display,type,action)
#endif /* G_ENABLE_DEBUG */ #endif /* G_ENABLE_DEBUG */
#define GDK_DEBUG_CHECK(type) GDK_DISPLAY_DEBUG_CHECK (NULL,type)
#define GDK_NOTE(type,action) GDK_DISPLAY_NOTE (NULL,type,action)
/* Event handling */ /* Event handling */
typedef struct _GdkEventPrivate GdkEventPrivate; typedef struct _GdkEventPrivate GdkEventPrivate;

View File

@ -245,7 +245,8 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
} }
else else
{ {
GDK_NOTE (VULKAN, g_warning ("Vulkan swapchain doesn't do transparency. Using opaque swapchain instead.")); GDK_DISPLAY_NOTE (gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)),
VULKAN, g_warning ("Vulkan swapchain doesn't do transparency. Using opaque swapchain instead."));
composite_alpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; composite_alpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
} }
@ -762,7 +763,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
} }
} }
if (list_devices || GDK_DEBUG_CHECK (VULKAN)) if (list_devices || GDK_DISPLAY_DEBUG_CHECK (display, VULKAN))
{ {
for (i = 0; i < n_devices; i++) for (i = 0; i < n_devices; i++)
{ {
@ -824,7 +825,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
{ {
if (queue_props[j].queueFlags & VK_QUEUE_GRAPHICS_BIT) if (queue_props[j].queueFlags & VK_QUEUE_GRAPHICS_BIT)
{ {
GDK_NOTE (VULKAN, g_print ("Using Vulkan device %u, queue %u\n", i, j)); GDK_DISPLAY_NOTE (display, VULKAN, g_print ("Using Vulkan device %u, queue %u\n", i, j));
if (GDK_VK_CHECK (vkCreateDevice, devices[i], if (GDK_VK_CHECK (vkCreateDevice, devices[i],
&(VkDeviceCreateInfo) { &(VkDeviceCreateInfo) {
VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
@ -913,11 +914,12 @@ gdk_display_create_vulkan_instance (GdkDisplay *display,
for (i = 0; i < n_extensions; i++) for (i = 0; i < n_extensions; i++)
{ {
GDK_NOTE (VULKAN, g_print ("Extension available: %s v%u.%u.%u\n", if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN))
g_print ("Extension available: %s v%u.%u.%u\n",
extensions[i].extensionName, extensions[i].extensionName,
VK_VERSION_MAJOR (extensions[i].specVersion), VK_VERSION_MAJOR (extensions[i].specVersion),
VK_VERSION_MINOR (extensions[i].specVersion), VK_VERSION_MINOR (extensions[i].specVersion),
VK_VERSION_PATCH (extensions[i].specVersion))); VK_VERSION_PATCH (extensions[i].specVersion));
if (g_str_equal (extensions[i].extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME)) if (g_str_equal (extensions[i].extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME))
{ {
@ -935,13 +937,14 @@ gdk_display_create_vulkan_instance (GdkDisplay *display,
for (i = 0; i < n_layers; i++) for (i = 0; i < n_layers; i++)
{ {
GDK_NOTE (VULKAN, g_print ("Layer available: %s v%u.%u.%u (%s)\n", if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN))
g_print ("Layer available: %s v%u.%u.%u (%s)\n",
layers[i].layerName, layers[i].layerName,
VK_VERSION_MAJOR (layers[i].specVersion), VK_VERSION_MAJOR (layers[i].specVersion),
VK_VERSION_MINOR (layers[i].specVersion), VK_VERSION_MINOR (layers[i].specVersion),
VK_VERSION_PATCH (layers[i].specVersion), VK_VERSION_PATCH (layers[i].specVersion),
layers[i].description)); layers[i].description);
if (GDK_DEBUG_CHECK (VULKAN_VALIDATE) && if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN_VALIDATE) &&
g_str_equal (layers[i].layerName, "VK_LAYER_LUNARG_standard_validation")) g_str_equal (layers[i].layerName, "VK_LAYER_LUNARG_standard_validation"))
{ {
g_ptr_array_add (used_layers, (gpointer) "VK_LAYER_LUNARG_standard_validation"); g_ptr_array_add (used_layers, (gpointer) "VK_LAYER_LUNARG_standard_validation");
@ -949,7 +952,7 @@ gdk_display_create_vulkan_instance (GdkDisplay *display,
} }
} }
if (GDK_DEBUG_CHECK (VULKAN_VALIDATE) && !validate) if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN_VALIDATE) && !validate)
{ {
g_warning ("Vulkan validation layers were requested, but not found. Running without."); g_warning ("Vulkan validation layers were requested, but not found. Running without.");
} }

View File

@ -60,9 +60,7 @@ gdk_vulkan_handle_result (VkResult res,
const char *called_function) const char *called_function)
{ {
if (res != VK_SUCCESS) if (res != VK_SUCCESS)
{ GDK_NOTE (VULKAN, g_printerr ("%s(): %s (%d)\n", called_function, gdk_vulkan_strerror (res), res));
GDK_NOTE (VULKAN,g_printerr ("%s(): %s (%d)\n", called_function, gdk_vulkan_strerror (res), res));
}
return res; return res;
} }
@ -78,7 +76,7 @@ static inline gboolean
gdk_display_ref_vulkan (GdkDisplay *display, gdk_display_ref_vulkan (GdkDisplay *display,
GError **error) GError **error)
{ {
GDK_NOTE (VULKAN, g_print ("Support for Vulkan disabled at compile-time")); GDK_NOTE (display, VULKAN, g_print ("Support for Vulkan disabled at compile-time"));
g_set_error_literal (error, GDK_VULKAN_ERROR, GDK_VULKAN_ERROR_UNSUPPORTED, g_set_error_literal (error, GDK_VULKAN_ERROR, GDK_VULKAN_ERROR_UNSUPPORTED,
"Vulkan support was not enabled at compile time."); "Vulkan support was not enabled at compile time.");

View File

@ -998,7 +998,7 @@ gdk_window_new (GdkDisplay *display,
g_signal_connect (display, "seat-removed", G_CALLBACK (seat_removed_cb), window); g_signal_connect (display, "seat-removed", G_CALLBACK (seat_removed_cb), window);
if (GDK_DEBUG_CHECK (GL_ALWAYS)) if (GDK_DISPLAY_DEBUG_CHECK (display, GL_ALWAYS))
{ {
GError *error = NULL; GError *error = NULL;
@ -1871,7 +1871,7 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
{ {
GError *internal_error = NULL; GError *internal_error = NULL;
if (GDK_DEBUG_CHECK (GL_DISABLE)) if (GDK_DISPLAY_DEBUG_CHECK (window->display, GL_DISABLE))
{ {
g_set_error_literal (error, GDK_GL_ERROR, g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_NOT_AVAILABLE, GDK_GL_ERROR_NOT_AVAILABLE,
@ -1976,7 +1976,7 @@ gdk_window_create_vulkan_context (GdkWindow *window,
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
if (GDK_DEBUG_CHECK (VULKAN_DISABLE)) if (GDK_DISPLAY_DEBUG_CHECK (window->display, VULKAN_DISABLE))
{ {
g_set_error_literal (error, GDK_VULKAN_ERROR, GDK_VULKAN_ERROR_NOT_AVAILABLE, g_set_error_literal (error, GDK_VULKAN_ERROR, GDK_VULKAN_ERROR_NOT_AVAILABLE,
_("Vulkan support disabled via GDK_DEBUG")); _("Vulkan support disabled via GDK_DEBUG"));
@ -5781,13 +5781,13 @@ gdk_window_create_similar_surface (GdkWindow * window,
sx = sy = 1; sx = sy = 1;
cairo_surface_get_device_scale (window_surface, &sx, &sy); cairo_surface_get_device_scale (window_surface, &sx, &sy);
if (GDK_DEBUG_CHECK (CAIRO_RECORDING)) if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_RECORDING))
{ {
cairo_rectangle_t rect = { 0, 0, width * sx, height *sy }; cairo_rectangle_t rect = { 0, 0, width * sx, height *sy };
surface = cairo_recording_surface_create (content, &rect); surface = cairo_recording_surface_create (content, &rect);
cairo_surface_set_device_scale (surface, sx, sy); cairo_surface_set_device_scale (surface, sx, sy);
} }
else if (GDK_DEBUG_CHECK (CAIRO_IMAGE)) else if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_IMAGE))
{ {
surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 : surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32, content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,

View File

@ -77,7 +77,7 @@ gdk_wayland_clipboard_data_source_target (void *data,
struct wl_data_source *source, struct wl_data_source *source,
const char *mime_type) const char *mime_type)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Huh? data_source.target() events?\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: Huh? data_source.target() events?\n", data));
} }
static void static void
@ -89,7 +89,7 @@ gdk_wayland_clipboard_write_done (GObject *clipboard,
if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error)) if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), CLIPBOARD, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message));
g_error_free (error); g_error_free (error);
} }
} }
@ -103,7 +103,7 @@ gdk_wayland_clipboard_data_source_send (void *data,
GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data); GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data);
GOutputStream *stream; GOutputStream *stream;
GDK_NOTE (CLIPBOARD, g_printerr ("%p: data source send request for %s on fd %d\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source send request for %s on fd %d\n",
source, mime_type, fd)); source, mime_type, fd));
mime_type = gdk_intern_mime_type (mime_type); mime_type = gdk_intern_mime_type (mime_type);
@ -125,7 +125,7 @@ gdk_wayland_clipboard_data_source_cancelled (void *data,
{ {
GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data); GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data);
GDK_NOTE (CLIPBOARD, g_printerr ("%p: data source cancelled\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source cancelled\n", data));
if (cb->source == source) if (cb->source == source)
{ {
@ -138,14 +138,16 @@ static void
gdk_wayland_clipboard_data_source_dnd_drop_performed (void *data, gdk_wayland_clipboard_data_source_dnd_drop_performed (void *data,
struct wl_data_source *source) struct wl_data_source *source)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_drop_performed() events?\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_drop_performed() events?\n", data));
} }
static void static void
gdk_wayland_clipboard_data_source_dnd_finished (void *data, gdk_wayland_clipboard_data_source_dnd_finished (void *data,
struct wl_data_source *source) struct wl_data_source *source)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_finished() events?\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_finished() events?\n", data));
} }
static void static void
@ -153,7 +155,8 @@ gdk_wayland_clipboard_data_source_action (void *data,
struct wl_data_source *source, struct wl_data_source *source,
uint32_t action) uint32_t action)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Huh? data_source.action() events?\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
CLIPBOARD, g_printerr ("%p: Huh? data_source.action() events?\n", data));
} }
static const struct wl_data_source_listener data_source_listener = { static const struct wl_data_source_listener data_source_listener = {
@ -218,7 +221,7 @@ gdk_wayland_clipboard_read_async (GdkClipboard *clipboard,
g_task_set_priority (task, io_priority); g_task_set_priority (task, io_priority);
g_task_set_source_tag (task, gdk_wayland_clipboard_read_async); g_task_set_source_tag (task, gdk_wayland_clipboard_read_async);
GDK_NOTE (CLIPBOARD, char *s = gdk_content_formats_to_string (formats); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
g_printerr ("%p: read for %s\n", cb, s); g_printerr ("%p: read for %s\n", cb, s);
g_free (s); ); g_free (s); );
mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats); mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats);
@ -302,14 +305,14 @@ gdk_wayland_clipboard_claim_remote (GdkWaylandClipboard *cb,
if (cb->source) if (cb->source)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
gdk_content_formats_unref (formats); gdk_content_formats_unref (formats);
return; return;
} }
gdk_wayland_clipboard_discard_offer (cb); gdk_wayland_clipboard_discard_offer (cb);
GDK_NOTE (CLIPBOARD, char *s = gdk_content_formats_to_string (formats); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
g_printerr ("%p: remote clipboard claim for %s\n", cb, s); g_printerr ("%p: remote clipboard claim for %s\n", cb, s);
g_free (s); ); g_free (s); );
cb->offer_formats = formats; cb->offer_formats = formats;

View File

@ -1062,7 +1062,7 @@ data_device_data_offer (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("data device data offer, data device %p, offer %p", g_message ("data device data offer, data device %p, offer %p",
data_device, offer)); data_device, offer));
@ -1086,7 +1086,7 @@ data_device_enter (void *data,
if (!GDK_IS_WINDOW (dest_window)) if (!GDK_IS_WINDOW (dest_window))
return; return;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("data device enter, data device %p serial %u, surface %p, x %f y %f, offer %p", 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)); data_device, serial, surface, wl_fixed_to_double (x), wl_fixed_to_double (y), offer));
@ -1118,7 +1118,7 @@ data_device_leave (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("data device leave, data device %p", data_device)); g_message ("data device leave, data device %p", data_device));
if (!gdk_drag_context_get_dest_window (seat->drop_context)) if (!gdk_drag_context_get_dest_window (seat->drop_context))
@ -1142,7 +1142,7 @@ data_device_motion (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("data device motion, data_device = %p, time = %d, x = %f, y = %f", 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))); data_device, time, wl_fixed_to_double (x), wl_fixed_to_double (y)));
@ -1167,7 +1167,7 @@ data_device_drop (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("data device drop, data device %p", data_device)); g_message ("data device drop, data device %p", data_device));
_gdk_wayland_drag_context_emit_event (seat->drop_context, _gdk_wayland_drag_context_emit_event (seat->drop_context,
@ -1392,7 +1392,7 @@ pointer_handle_enter (void *data,
&event->crossing.x_root, &event->crossing.x_root,
&event->crossing.y_root); &event->crossing.y_root);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("enter, seat %p surface %p", g_message ("enter, seat %p surface %p",
seat, seat->pointer_info.focus)); seat, seat->pointer_info.focus));
@ -1440,7 +1440,7 @@ pointer_handle_leave (void *data,
&event->crossing.x_root, &event->crossing.x_root,
&event->crossing.y_root); &event->crossing.y_root);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("leave, seat %p surface %p", g_message ("leave, seat %p surface %p",
seat, seat->pointer_info.focus)); seat, seat->pointer_info.focus));
@ -1487,7 +1487,7 @@ pointer_handle_motion (void *data,
&event->motion.x_root, &event->motion.x_root,
&event->motion.y_root); &event->motion.y_root);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("motion %f %f, seat %p state %d", g_message ("motion %f %f, seat %p state %d",
wl_fixed_to_double (sx), wl_fixed_to_double (sy), wl_fixed_to_double (sx), wl_fixed_to_double (sy),
seat, event->motion.state)); seat, event->motion.state));
@ -1560,7 +1560,7 @@ pointer_handle_button (void *data,
else else
seat->pointer_info.button_modifiers &= ~modifier; seat->pointer_info.button_modifiers &= ~modifier;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("button %d %s, seat %p state %d", g_message ("button %d %s, seat %p state %d",
event->button.button, event->button.button,
state ? "press" : "release", state ? "press" : "release",
@ -1618,7 +1618,7 @@ pointer_handle_axis (void *data,
seat->pointer_info.time = time; seat->pointer_info.time = time;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("scroll, axis %s, value %f, seat %p", g_message ("scroll, axis %s, value %f, seat %p",
get_axis_name (axis), wl_fixed_to_double (value) / 10.0, get_axis_name (axis), wl_fixed_to_double (value) / 10.0,
seat)); seat));
@ -1633,7 +1633,7 @@ pointer_handle_frame (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("frame, seat %p", seat)); g_message ("frame, seat %p", seat));
gdk_wayland_seat_flush_frame_event (seat); gdk_wayland_seat_flush_frame_event (seat);
@ -1674,7 +1674,7 @@ pointer_handle_axis_source (void *data,
pointer_frame->source = source; pointer_frame->source = source;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("axis source %s, seat %p", get_axis_source_name (source), seat)); g_message ("axis source %s, seat %p", get_axis_source_name (source), seat));
} }
@ -1706,7 +1706,7 @@ pointer_handle_axis_stop (void *data,
pointer_frame->is_scroll_stop = TRUE; pointer_frame->is_scroll_stop = TRUE;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("axis %s stop, seat %p", get_axis_name (axis), seat)); g_message ("axis %s stop, seat %p", get_axis_name (axis), seat));
} }
@ -1734,7 +1734,7 @@ pointer_handle_axis_discrete (void *data,
g_return_if_reached (); g_return_if_reached ();
} }
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("discrete scroll, axis %s, value %d, seat %p", g_message ("discrete scroll, axis %s, value %d, seat %p",
get_axis_name (axis), value, seat)); get_axis_name (axis), value, seat));
} }
@ -1790,7 +1790,7 @@ keyboard_handle_enter (void *data,
gdk_event_set_device (event, seat->master_keyboard); gdk_event_set_device (event, seat->master_keyboard);
gdk_event_set_source_device (event, seat->keyboard); gdk_event_set_source_device (event, seat->keyboard);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("focus in, seat %p surface %p", g_message ("focus in, seat %p surface %p",
seat, seat->keyboard_focus)); seat, seat->keyboard_focus));
@ -1831,7 +1831,7 @@ keyboard_handle_leave (void *data,
seat->keyboard_focus = NULL; seat->keyboard_focus = NULL;
seat->repeat_key = 0; seat->repeat_key = 0;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("focus out, seat %p surface %p", g_message ("focus out, seat %p surface %p",
seat, seat->keyboard_focus)); seat, seat->keyboard_focus));
@ -2026,7 +2026,7 @@ deliver_key_event (GdkWaylandSeat *seat,
_gdk_wayland_display_deliver_event (seat->display, event); _gdk_wayland_display_deliver_event (seat->display, event);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("keyboard %s event%s, code %d, sym %d, " g_message ("keyboard %s event%s, code %d, sym %d, "
"string %s, mods 0x%x", "string %s, mods 0x%x",
(state ? "press" : "release"), (state ? "press" : "release"),
@ -2314,7 +2314,7 @@ touch_handle_down (void *data,
mimic_pointer_emulating_touch_info (seat->touch_master, touch); mimic_pointer_emulating_touch_info (seat->touch_master, touch);
} }
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("touch begin %f %f", event->touch.x, event->touch.y)); g_message ("touch begin %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (seat->display, event); _gdk_wayland_display_deliver_event (seat->display, event);
@ -2337,7 +2337,7 @@ touch_handle_up (void *data,
touch = gdk_wayland_seat_get_touch (seat, id); touch = gdk_wayland_seat_get_touch (seat, id);
event = _create_touch_event (seat, touch, GDK_TOUCH_END, time); event = _create_touch_event (seat, touch, GDK_TOUCH_END, time);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("touch end %f %f", event->touch.x, event->touch.y)); g_message ("touch end %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (seat->display, event); _gdk_wayland_display_deliver_event (seat->display, event);
@ -2369,7 +2369,7 @@ touch_handle_motion (void *data,
event = _create_touch_event (seat, touch, GDK_TOUCH_UPDATE, time); event = _create_touch_event (seat, touch, GDK_TOUCH_UPDATE, time);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("touch update %f %f", event->touch.x, event->touch.y)); g_message ("touch update %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (seat->display, event); _gdk_wayland_display_deliver_event (seat->display, event);
@ -2406,7 +2406,7 @@ touch_handle_cancel (void *data,
g_hash_table_iter_remove (&iter); g_hash_table_iter_remove (&iter);
} }
GDK_NOTE (EVENTS, g_message ("touch cancel")); GDK_DISPLAY_NOTE (wayland_seat->display, EVENTS, g_message ("touch cancel"));
} }
static void static void
@ -2442,7 +2442,7 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat,
&event->touchpad_swipe.x_root, &event->touchpad_swipe.x_root,
&event->touchpad_swipe.y_root); &event->touchpad_swipe.y_root);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("swipe event %d, coords: %f %f, seat %p state %d", g_message ("swipe event %d, coords: %f %f, seat %p state %d",
event->any.type, event->touchpad_swipe.x, event->any.type, event->touchpad_swipe.x,
event->touchpad_swipe.y, seat, event->touchpad_swipe.y, seat,
@ -2545,7 +2545,7 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat,
&event->touchpad_pinch.x_root, &event->touchpad_pinch.x_root,
&event->touchpad_pinch.y_root); &event->touchpad_pinch.y_root);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("pinch event %d, coords: %f %f, seat %p state %d", g_message ("pinch event %d, coords: %f %f, seat %p state %d",
event->any.type, event->touchpad_pinch.x, event->any.type, event->touchpad_pinch.x,
event->touchpad_pinch.y, seat, event->touchpad_pinch.y, seat,
@ -2869,7 +2869,7 @@ seat_handle_capabilities (void *data,
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display); GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
GDK_NOTE (MISC, GDK_DISPLAY_NOTE (seat->display, MISC,
g_message ("seat %p with %s%s%s", wl_seat, g_message ("seat %p with %s%s%s", wl_seat,
(caps & WL_SEAT_CAPABILITY_POINTER) ? " pointer, " : "", (caps & WL_SEAT_CAPABILITY_POINTER) ? " pointer, " : "",
(caps & WL_SEAT_CAPABILITY_KEYBOARD) ? " keyboard, " : "", (caps & WL_SEAT_CAPABILITY_KEYBOARD) ? " keyboard, " : "",
@ -3097,7 +3097,7 @@ seat_handle_name (void *data,
const char *name) const char *name)
{ {
/* We don't care about the name. */ /* We don't care about the name. */
GDK_NOTE (MISC, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (data)->display, MISC,
g_message ("seat %p name %s", seat, name)); g_message ("seat %p name %s", seat, name));
} }
@ -3402,7 +3402,7 @@ tablet_tool_handle_proximity_in (void *data,
gdk_event_set_source_device (event, tablet->current_device); gdk_event_set_source_device (event, tablet->current_device);
gdk_event_set_device_tool (event, tool->tool); gdk_event_set_device_tool (event, tool->tool);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("proximity in, seat %p surface %p tool %d", g_message ("proximity in, seat %p surface %p tool %d",
seat, tablet->pointer_info.focus, seat, tablet->pointer_info.focus,
gdk_device_tool_get_tool_type (tool->tool))); gdk_device_tool_get_tool_type (tool->tool)));
@ -3417,7 +3417,7 @@ tablet_tool_handle_proximity_out (void *data,
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat); GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
GdkEvent *event; GdkEvent *event;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("proximity out, seat %p, tool %d", seat, g_message ("proximity out, seat %p, tool %d", seat,
gdk_device_tool_get_tool_type (tool->tool))); gdk_device_tool_get_tool_type (tool->tool)));
@ -3510,7 +3510,7 @@ tablet_tool_handle_motion (void *data,
tablet->pointer_info.surface_x = wl_fixed_to_double (sx); tablet->pointer_info.surface_x = wl_fixed_to_double (sx);
tablet->pointer_info.surface_y = wl_fixed_to_double (sy); tablet->pointer_info.surface_y = wl_fixed_to_double (sy);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet motion %f %f", g_message ("tablet motion %f %f",
tablet->pointer_info.surface_x, tablet->pointer_info.surface_x,
tablet->pointer_info.surface_y)); tablet->pointer_info.surface_y));
@ -3544,7 +3544,7 @@ tablet_tool_handle_pressure (void *data,
_gdk_device_translate_axis (tablet->current_device, axis_index, _gdk_device_translate_axis (tablet->current_device, axis_index,
pressure, &tablet->axes[axis_index]); pressure, &tablet->axes[axis_index]);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (tool->seat)->display, EVENTS,
g_message ("tablet tool %d pressure %d", g_message ("tablet tool %d pressure %d",
gdk_device_tool_get_tool_type (tool->tool), pressure)); gdk_device_tool_get_tool_type (tool->tool), pressure));
} }
@ -3561,7 +3561,7 @@ tablet_tool_handle_distance (void *data,
_gdk_device_translate_axis (tablet->current_device, axis_index, _gdk_device_translate_axis (tablet->current_device, axis_index,
distance, &tablet->axes[axis_index]); distance, &tablet->axes[axis_index]);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (tool->seat)->display, EVENTS,
g_message ("tablet tool %d distance %d", g_message ("tablet tool %d distance %d",
gdk_device_tool_get_tool_type (tool->tool), distance)); gdk_device_tool_get_tool_type (tool->tool), distance));
} }
@ -3584,7 +3584,7 @@ tablet_tool_handle_tilt (void *data,
wl_fixed_to_double (ytilt), wl_fixed_to_double (ytilt),
&tablet->axes[ytilt_axis_index]); &tablet->axes[ytilt_axis_index]);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (tool->seat)->display, EVENTS,
g_message ("tablet tool %d tilt %f/%f", g_message ("tablet tool %d tilt %f/%f",
gdk_device_tool_get_tool_type (tool->tool), gdk_device_tool_get_tool_type (tool->tool),
wl_fixed_to_double (xtilt), wl_fixed_to_double (ytilt))); wl_fixed_to_double (xtilt), wl_fixed_to_double (ytilt)));
@ -3637,7 +3637,7 @@ tablet_tool_handle_rotation (void *data,
wl_fixed_to_double (degrees), wl_fixed_to_double (degrees),
&tablet->axes[axis_index]); &tablet->axes[axis_index]);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (tool->seat)->display, EVENTS,
g_message ("tablet tool %d rotation %f", g_message ("tablet tool %d rotation %f",
gdk_device_tool_get_tool_type (tool->tool), gdk_device_tool_get_tool_type (tool->tool),
wl_fixed_to_double (degrees))); wl_fixed_to_double (degrees)));
@ -3655,7 +3655,7 @@ tablet_tool_handle_slider (void *data,
_gdk_device_translate_axis (tablet->current_device, axis_index, _gdk_device_translate_axis (tablet->current_device, axis_index,
position, &tablet->axes[axis_index]); position, &tablet->axes[axis_index]);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_WAYLAND_SEAT (tool->seat)->display, EVENTS,
g_message ("tablet tool %d slider %d", g_message ("tablet tool %d slider %d",
gdk_device_tool_get_tool_type (tool->tool), position)); gdk_device_tool_get_tool_type (tool->tool), position));
} }
@ -3671,7 +3671,7 @@ tablet_tool_handle_wheel (void *data,
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat); GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
GdkEvent *event; GdkEvent *event;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet tool %d wheel %d/%d", g_message ("tablet tool %d wheel %d/%d",
gdk_device_tool_get_tool_type (tool->tool), degrees, clicks)); gdk_device_tool_get_tool_type (tool->tool), degrees, clicks));
@ -3701,9 +3701,10 @@ tablet_tool_handle_frame (void *data,
{ {
GdkWaylandTabletToolData *tool = data; GdkWaylandTabletToolData *tool = data;
GdkWaylandTabletData *tablet = tool->current_tablet; GdkWaylandTabletData *tablet = tool->current_tablet;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
GdkEvent *frame_event; GdkEvent *frame_event;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet frame, time %d", time)); g_message ("tablet frame, time %d", time));
frame_event = tablet->pointer_info.frame.event; frame_event = tablet->pointer_info.frame.event;
@ -3746,8 +3747,10 @@ tablet_pad_ring_handle_source (void *data,
uint32_t source) uint32_t source)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad ring handle source, ring = %p source = %d", g_message ("tablet pad ring handle source, ring = %p source = %d",
wp_tablet_pad_ring, source)); wp_tablet_pad_ring, source));
@ -3760,8 +3763,10 @@ tablet_pad_ring_handle_angle (void *data,
wl_fixed_t angle) wl_fixed_t angle)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad ring handle angle, %s ring = %p angle = %f", g_message ("tablet pad ring handle angle, %s ring = %p angle = %f",
wp_tablet_pad_ring, wl_fixed_to_double (angle))); wp_tablet_pad_ring, wl_fixed_to_double (angle)));
@ -3773,8 +3778,10 @@ tablet_pad_ring_handle_stop (void *data,
struct zwp_tablet_pad_ring_v2 *wp_tablet_pad_ring) struct zwp_tablet_pad_ring_v2 *wp_tablet_pad_ring)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad ring handle stop, ring = %p", wp_tablet_pad_ring)); g_message ("tablet pad ring handle stop, ring = %p", wp_tablet_pad_ring));
group->axis_tmp_info.is_stop = TRUE; group->axis_tmp_info.is_stop = TRUE;
@ -3790,7 +3797,7 @@ tablet_pad_ring_handle_frame (void *data,
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat); GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GdkEvent *event; GdkEvent *event;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad ring handle frame, ring = %p", wp_tablet_pad_ring)); g_message ("tablet pad ring handle frame, ring = %p", wp_tablet_pad_ring));
event = gdk_event_new (GDK_PAD_RING); event = gdk_event_new (GDK_PAD_RING);
@ -3820,8 +3827,10 @@ tablet_pad_strip_handle_source (void *data,
uint32_t source) uint32_t source)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad strip handle source, strip = %p source = %d", g_message ("tablet pad strip handle source, strip = %p source = %d",
wp_tablet_pad_strip, source)); wp_tablet_pad_strip, source));
@ -3834,8 +3843,10 @@ tablet_pad_strip_handle_position (void *data,
uint32_t position) uint32_t position)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad strip handle position, strip = %p position = %d", g_message ("tablet pad strip handle position, strip = %p position = %d",
wp_tablet_pad_strip, position)); wp_tablet_pad_strip, position));
@ -3847,8 +3858,10 @@ tablet_pad_strip_handle_stop (void *data,
struct zwp_tablet_pad_strip_v2 *wp_tablet_pad_strip) struct zwp_tablet_pad_strip_v2 *wp_tablet_pad_strip)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad strip handle stop, strip = %p", g_message ("tablet pad strip handle stop, strip = %p",
wp_tablet_pad_strip)); wp_tablet_pad_strip));
@ -3865,7 +3878,7 @@ tablet_pad_strip_handle_frame (void *data,
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat); GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GdkEvent *event; GdkEvent *event;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad strip handle frame, strip = %p", g_message ("tablet pad strip handle frame, strip = %p",
wp_tablet_pad_strip)); wp_tablet_pad_strip));
@ -3897,9 +3910,11 @@ tablet_pad_group_handle_buttons (void *data,
struct wl_array *buttons) struct wl_array *buttons)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
uint32_t *p; uint32_t *p;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle buttons, pad group = %p, n_buttons = %ld", g_message ("tablet pad group handle buttons, pad group = %p, n_buttons = %ld",
wp_tablet_pad_group, buttons->size)); wp_tablet_pad_group, buttons->size));
@ -3917,8 +3932,10 @@ tablet_pad_group_handle_ring (void *data,
struct zwp_tablet_pad_ring_v2 *wp_tablet_pad_ring) struct zwp_tablet_pad_ring_v2 *wp_tablet_pad_ring)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle ring, pad group = %p, ring = %p", g_message ("tablet pad group handle ring, pad group = %p, ring = %p",
wp_tablet_pad_group, wp_tablet_pad_ring)); wp_tablet_pad_group, wp_tablet_pad_ring));
@ -3936,8 +3953,10 @@ tablet_pad_group_handle_strip (void *data,
struct zwp_tablet_pad_strip_v2 *wp_tablet_pad_strip) struct zwp_tablet_pad_strip_v2 *wp_tablet_pad_strip)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle strip, pad group = %p, strip = %p", g_message ("tablet pad group handle strip, pad group = %p, strip = %p",
wp_tablet_pad_group, wp_tablet_pad_strip)); wp_tablet_pad_group, wp_tablet_pad_strip));
@ -3955,8 +3974,10 @@ tablet_pad_group_handle_modes (void *data,
uint32_t modes) uint32_t modes)
{ {
GdkWaylandTabletPadGroupData *group = data; GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle modes, pad group = %p, n_modes = %d", g_message ("tablet pad group handle modes, pad group = %p, n_modes = %d",
wp_tablet_pad_group, modes)); wp_tablet_pad_group, modes));
@ -3967,7 +3988,11 @@ static void
tablet_pad_group_handle_done (void *data, tablet_pad_group_handle_done (void *data,
struct zwp_tablet_pad_group_v2 *wp_tablet_pad_group) struct zwp_tablet_pad_group_v2 *wp_tablet_pad_group)
{ {
GDK_NOTE (EVENTS, GdkWaylandTabletPadGroupData *group = data;
GdkWaylandTabletPadData *pad = group->pad;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle done, pad group = %p", g_message ("tablet pad group handle done, pad group = %p",
wp_tablet_pad_group)); wp_tablet_pad_group));
} }
@ -3985,7 +4010,7 @@ tablet_pad_group_handle_mode (void *data,
GdkEvent *event; GdkEvent *event;
guint n_group; guint n_group;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad group handle mode, pad group = %p, mode = %d", g_message ("tablet pad group handle mode, pad group = %p, mode = %d",
wp_tablet_pad_group, mode)); wp_tablet_pad_group, mode));
@ -4021,8 +4046,9 @@ tablet_pad_handle_group (void *data,
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandTabletPadGroupData *group; GdkWaylandTabletPadGroupData *group;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle group, pad group = %p, group = %p", g_message ("tablet pad handle group, pad group = %p, group = %p",
wp_tablet_pad_group, wp_tablet_pad_group)); wp_tablet_pad_group, wp_tablet_pad_group));
@ -4042,8 +4068,9 @@ tablet_pad_handle_path (void *data,
const char *path) const char *path)
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle path, pad = %p, path = %s", g_message ("tablet pad handle path, pad = %p, path = %s",
wp_tablet_pad, path)); wp_tablet_pad, path));
@ -4056,8 +4083,9 @@ tablet_pad_handle_buttons (void *data,
uint32_t buttons) uint32_t buttons)
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle buttons, pad = %p, n_buttons = %d", g_message ("tablet pad handle buttons, pad = %p, n_buttons = %d",
wp_tablet_pad, buttons)); wp_tablet_pad, buttons));
@ -4071,7 +4099,7 @@ tablet_pad_handle_done (void *data,
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat); GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle done, pad = %p", wp_tablet_pad)); g_message ("tablet pad handle done, pad = %p", wp_tablet_pad));
pad->device = pad->device =
@ -4101,7 +4129,7 @@ tablet_pad_handle_button (void *data,
GdkEvent *event; GdkEvent *event;
gint n_group; gint n_group;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle button, pad = %p, button = %d, state = %d", g_message ("tablet pad handle button, pad = %p, button = %d, state = %d",
wp_tablet_pad, button, state)); wp_tablet_pad, button, state));
@ -4131,9 +4159,10 @@ tablet_pad_handle_enter (void *data,
struct wl_surface *surface) struct wl_surface *surface)
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GdkWaylandTabletData *tablet = zwp_tablet_v2_get_user_data (wp_tablet); GdkWaylandTabletData *tablet = zwp_tablet_v2_get_user_data (wp_tablet);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle enter, pad = %p, tablet = %p surface = %p", g_message ("tablet pad handle enter, pad = %p, tablet = %p surface = %p",
wp_tablet_pad, wp_tablet, surface)); wp_tablet_pad, wp_tablet, surface));
@ -4149,8 +4178,9 @@ tablet_pad_handle_leave (void *data,
struct wl_surface *surface) struct wl_surface *surface)
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle leave, pad = %p, surface = %p", g_message ("tablet pad handle leave, pad = %p, surface = %p",
wp_tablet_pad, surface)); wp_tablet_pad, surface));
@ -4166,8 +4196,9 @@ tablet_pad_handle_removed (void *data,
struct zwp_tablet_pad_v2 *wp_tablet_pad) struct zwp_tablet_pad_v2 *wp_tablet_pad)
{ {
GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadData *pad = data;
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (pad->seat);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("tablet pad handle removed, pad = %p", wp_tablet_pad)); g_message ("tablet pad handle removed, pad = %p", wp_tablet_pad));
/* Remove from the current tablet */ /* Remove from the current tablet */
@ -4326,7 +4357,7 @@ pointer_surface_enter (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("pointer surface of seat %p entered output %p", g_message ("pointer surface of seat %p entered output %p",
seat, output)); seat, output));
@ -4343,7 +4374,7 @@ pointer_surface_leave (void *data,
{ {
GdkWaylandSeat *seat = data; GdkWaylandSeat *seat = data;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (seat->display, EVENTS,
g_message ("pointer surface of seat %p left output %p", g_message ("pointer surface of seat %p left output %p",
seat, output)); seat, output));

View File

@ -133,7 +133,7 @@ xdg_shell_ping (void *data,
_gdk_wayland_display_update_serial (display_wayland, serial); _gdk_wayland_display_update_serial (display_wayland, serial);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_DISPLAY (data), EVENTS,
g_message ("ping, shell %p, serial %u\n", xdg_shell, serial)); g_message ("ping, shell %p, serial %u\n", xdg_shell, serial));
zxdg_shell_v6_pong (xdg_shell, serial); zxdg_shell_v6_pong (xdg_shell, serial);

View File

@ -335,7 +335,7 @@ gdk_wayland_drag_context_read_async (GdkDragContext *context,
g_task_set_priority (task, io_priority); g_task_set_priority (task, io_priority);
g_task_set_source_tag (task, gdk_wayland_drag_context_read_async); g_task_set_source_tag (task, gdk_wayland_drag_context_read_async);
GDK_NOTE (DND, char *s = gdk_content_formats_to_string (formats); GDK_DISPLAY_NOTE (display, DND, char *s = gdk_content_formats_to_string (formats);
g_printerr ("%p: read for %s\n", context, s); g_printerr ("%p: read for %s\n", context, s);
g_free (s); ); g_free (s); );
dnd_formats = gdk_wayland_selection_get_targets (display); dnd_formats = gdk_wayland_selection_get_targets (display);

View File

@ -56,9 +56,9 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
gdk_gl_context_get_required_version (context, &major, &minor); gdk_gl_context_get_required_version (context, &major, &minor);
debug_bit = gdk_gl_context_get_debug_enabled (context); debug_bit = gdk_gl_context_get_debug_enabled (context);
forward_bit = gdk_gl_context_get_forward_compatible (context); forward_bit = gdk_gl_context_get_forward_compatible (context);
legacy_bit = GDK_DEBUG_CHECK (GL_LEGACY) || legacy_bit = GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY) ||
(share != NULL && gdk_gl_context_is_legacy (share)); (share != NULL && gdk_gl_context_is_legacy (share));
use_es = GDK_DEBUG_CHECK (GL_GLES) || use_es = GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES) ||
(share != NULL && gdk_gl_context_get_use_es (share)); (share != NULL && gdk_gl_context_get_use_es (share));
flags = 0; flags = 0;
@ -102,7 +102,8 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
context_attribs[i++] = EGL_NONE; context_attribs[i++] = EGL_NONE;
g_assert (i < N_EGL_ATTRS); g_assert (i < N_EGL_ATTRS);
GDK_NOTE (OPENGL, g_message ("Creating EGL context version %d.%d (debug:%s, forward:%s, legacy:%s, es:%s)", GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Creating EGL context version %d.%d (debug:%s, forward:%s, legacy:%s, es:%s)",
major, minor, major, minor,
debug_bit ? "yes" : "no", debug_bit ? "yes" : "no",
forward_bit ? "yes" : "no", forward_bit ? "yes" : "no",
@ -129,7 +130,8 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
legacy_bit = TRUE; legacy_bit = TRUE;
use_es = FALSE; use_es = FALSE;
GDK_NOTE (OPENGL, g_message ("eglCreateContext failed, switching to legacy")); GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("eglCreateContext failed, switching to legacy"));
ctx = eglCreateContext (display_wayland->egl_display, ctx = eglCreateContext (display_wayland->egl_display,
context_wayland->egl_config, context_wayland->egl_config,
share != NULL ? GDK_WAYLAND_GL_CONTEXT (share)->egl_context share != NULL ? GDK_WAYLAND_GL_CONTEXT (share)->egl_context
@ -145,7 +147,7 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
return FALSE; return FALSE;
} }
GDK_NOTE (OPENGL, g_message ("Created EGL context[%p]", ctx)); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Created EGL context[%p]", ctx));
context_wayland->egl_context = ctx; context_wayland->egl_context = ctx;
@ -338,7 +340,7 @@ gdk_wayland_display_init_gl (GdkDisplay *display)
display_wayland->have_egl_surfaceless_context = display_wayland->have_egl_surfaceless_context =
epoxy_has_egl_extension (dpy, "EGL_KHR_surfaceless_context"); epoxy_has_egl_extension (dpy, "EGL_KHR_surfaceless_context");
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("EGL API version %d.%d found\n" g_message ("EGL API version %d.%d found\n"
" - Vendor: %s\n" " - Vendor: %s\n"
" - Version: %s\n" " - Version: %s\n"
@ -472,7 +474,7 @@ gdk_wayland_gl_context_dispose (GObject *gobject)
eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT); EGL_NO_CONTEXT);
GDK_NOTE (OPENGL, g_message ("Destroying EGL context")); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Destroying EGL context"));
eglDestroyContext (display_wayland->egl_display, eglDestroyContext (display_wayland->egl_display,
context_wayland->egl_context); context_wayland->egl_context);

View File

@ -625,7 +625,7 @@ _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
return; return;
} }
GDK_NOTE(INPUT, g_print ("keymap:\n%s\n", map_str)); GDK_DISPLAY_NOTE (keymap->display, INPUT, g_print ("keymap:\n%s\n", map_str));
xkb_keymap = xkb_keymap_new_from_string (context, map_str, format, 0); xkb_keymap = xkb_keymap_new_from_string (context, map_str, format, 0);
munmap (map_str, size); munmap (map_str, size);
@ -638,7 +638,7 @@ _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
return; return;
} }
GDK_NOTE(INPUT, print_modifiers (xkb_keymap)); GDK_DISPLAY_NOTE (keymap->display, INPUT, print_modifiers (xkb_keymap));
xkb_keymap_unref (keymap_wayland->xkb_keymap); xkb_keymap_unref (keymap_wayland->xkb_keymap);
keymap_wayland->xkb_keymap = xkb_keymap; keymap_wayland->xkb_keymap = xkb_keymap;

View File

@ -99,14 +99,14 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
if (cb->source) if (cb->source)
{ {
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
gdk_content_formats_unref (formats); gdk_content_formats_unref (formats);
return; return;
} }
gdk_wayland_primary_discard_offer (cb); gdk_wayland_primary_discard_offer (cb);
GDK_NOTE (CLIPBOARD, char *s = gdk_content_formats_to_string (formats); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
g_printerr ("%p: remote clipboard claim for %s\n", cb, s); g_printerr ("%p: remote clipboard claim for %s\n", cb, s);
g_free (s); ); g_free (s); );
cb->offer_formats = formats; cb->offer_formats = formats;
@ -125,7 +125,7 @@ primary_offer_offer (void *data,
if (cb->pending != offer) if (cb->pending != offer)
{ {
GDK_NOTE (SELECTION, g_printerr ("%p: offer for unknown selection %p of %s\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: offer for unknown selection %p of %s\n",
cb, offer, type)); cb, offer, type));
return; return;
} }
@ -144,7 +144,7 @@ primary_selection_data_offer (void *data,
{ {
GdkWaylandPrimary *cb = data; GdkWaylandPrimary *cb = data;
GDK_NOTE (SELECTION, g_printerr ("%p: new primary offer %p\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: new primary offer %p\n",
cb, offer)); cb, offer));
gdk_wayland_primary_discard_pending (cb); gdk_wayland_primary_discard_pending (cb);
@ -173,7 +173,7 @@ primary_selection_selection (void *data,
if (cb->pending != offer) if (cb->pending != offer)
{ {
GDK_NOTE (SELECTION, g_printerr ("%p: ignoring unknown data offer %p\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: ignoring unknown data offer %p\n",
cb, offer)); cb, offer));
return; return;
} }
@ -199,7 +199,7 @@ gdk_wayland_primary_write_done (GObject *clipboard,
if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error)) if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error))
{ {
GDK_NOTE (SELECTION, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), SELECTION, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message));
g_error_free (error); g_error_free (error);
} }
} }
@ -213,7 +213,7 @@ gdk_wayland_primary_data_source_send (void *data,
GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data); GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data);
GOutputStream *stream; GOutputStream *stream;
GDK_NOTE (SELECTION, g_printerr ("%p: data source send request for %s on fd %d\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), SELECTION, g_printerr ("%p: data source send request for %s on fd %d\n",
source, mime_type, fd)); source, mime_type, fd));
mime_type = gdk_intern_mime_type (mime_type); mime_type = gdk_intern_mime_type (mime_type);
@ -235,7 +235,7 @@ gdk_wayland_primary_data_source_cancelled (void *
{ {
GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data); GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data);
GDK_NOTE (CLIPBOARD, g_printerr ("%p: data source cancelled\n", data)); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source cancelled\n", data));
if (cb->source == source) if (cb->source == source)
{ {
@ -302,7 +302,7 @@ gdk_wayland_primary_read_async (GdkClipboard *clipboard,
g_task_set_priority (task, io_priority); g_task_set_priority (task, io_priority);
g_task_set_source_tag (task, gdk_wayland_primary_read_async); g_task_set_source_tag (task, gdk_wayland_primary_read_async);
GDK_NOTE (CLIPBOARD, char *s = gdk_content_formats_to_string (formats); GDK_DISPLAY_NOTE (gdk_clipboard_get_display (clipboard), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
g_printerr ("%p: read for %s\n", cb, s); g_printerr ("%p: read for %s\n", cb, s);
g_free (s); ); g_free (s); );
mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats); mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats);

View File

@ -159,7 +159,7 @@ data_offer_source_actions (void *data,
drop_context->actions = _wl_to_gdk_actions (source_actions); drop_context->actions = _wl_to_gdk_actions (source_actions);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("data offer source actions, offer %p, actions %d", wl_data_offer, source_actions)); g_message ("data offer source actions, offer %p, actions %d", wl_data_offer, source_actions));
if (gdk_drag_context_get_dest_window (drop_context)) if (gdk_drag_context_get_dest_window (drop_context))
@ -311,7 +311,7 @@ gdk_wayland_drag_context_write_done (GObject *context,
if (!gdk_drag_context_write_finish (GDK_DRAG_CONTEXT (context), result, &error)) if (!gdk_drag_context_write_finish (GDK_DRAG_CONTEXT (context), result, &error))
{ {
GDK_NOTE(DND, g_printerr ("%p: failed to write stream: %s\n", context, error->message)); GDK_DISPLAY_NOTE (gdk_drag_context_get_display (GDK_DRAG_CONTEXT (context)), DND, g_printerr ("%p: failed to write stream: %s\n", context, error->message));
g_error_free (error); g_error_free (error);
} }
} }
@ -329,7 +329,7 @@ data_source_send (void *data,
if (!context) if (!context)
return; return;
GDK_NOTE (DND, g_printerr ("%p: data source send request for %s on fd %d\n", GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND, g_printerr ("%p: data source send request for %s on fd %d\n",
source, mime_type, fd)); source, mime_type, fd));
//mime_type = gdk_intern_mime_type (mime_type); //mime_type = gdk_intern_mime_type (mime_type);
@ -354,11 +354,11 @@ data_source_cancelled (void *data,
GdkDragContext *context; GdkDragContext *context;
GdkDisplay *display; GdkDisplay *display;
GDK_NOTE (EVENTS,
g_message ("data source cancelled, source = %p", source));
display = gdk_display_get_default (); display = gdk_display_get_default ();
GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("data source cancelled, source = %p", source));
if (source != wayland_selection->dnd_source) if (source != wayland_selection->dnd_source)
return; return;
@ -405,15 +405,14 @@ data_source_action (void *data,
{ {
GdkDragContext *context; GdkDragContext *context;
GDK_NOTE (EVENTS,
g_message ("data source action, source = %p action=%x",
source, action));
context = gdk_wayland_drag_context_lookup_by_data_source (source); context = gdk_wayland_drag_context_lookup_by_data_source (source);
if (!context) if (!context)
return; return;
GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), EVENTS,
g_message ("data source action, source = %p action=%x",
source, action));
context->action = _wl_to_gdk_actions (action); context->action = _wl_to_gdk_actions (action);
g_signal_emit_by_name (context, "action-changed", context->action); g_signal_emit_by_name (context, "action-changed", context->action);
} }

View File

@ -444,8 +444,7 @@ frame_callback (void *data,
GdkFrameClock *clock = gdk_window_get_frame_clock (window); GdkFrameClock *clock = gdk_window_get_frame_clock (window);
GdkFrameTimings *timings; GdkFrameTimings *timings;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (GDK_DISPLAY (display_wayland), EVENTS, g_message ("frame %p", window));
g_message ("frame %p", window));
wl_callback_destroy (callback); wl_callback_destroy (callback);
@ -1212,7 +1211,7 @@ surface_enter (void *data,
GdkWindow *window = GDK_WINDOW (data); GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (gdk_window_get_display (window), EVENTS,
g_message ("surface enter, window %p output %p", window, output)); g_message ("surface enter, window %p output %p", window, output));
impl->display_server.outputs = g_slist_prepend (impl->display_server.outputs, output); impl->display_server.outputs = g_slist_prepend (impl->display_server.outputs, output);
@ -1228,7 +1227,7 @@ surface_leave (void *data,
GdkWindow *window = GDK_WINDOW (data); GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (gdk_window_get_display (window), EVENTS,
g_message ("surface leave, window %p output %p", window, output)); g_message ("surface leave, window %p output %p", window, output));
impl->display_server.outputs = g_slist_remove (impl->display_server.outputs, output); impl->display_server.outputs = g_slist_remove (impl->display_server.outputs, output);
@ -1377,7 +1376,7 @@ xdg_surface_configure (void *data,
gdk_wayland_window_configure (window, width, height, impl->scale); gdk_wayland_window_configure (window, width, height, impl->scale);
} }
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (gdk_window_get_display (window), EVENTS,
g_message ("configure, window %p %dx%d,%s%s%s%s", g_message ("configure, window %p %dx%d,%s%s%s%s",
window, width, height, window, width, height,
(new_state & GDK_WINDOW_STATE_FULLSCREEN) ? " fullscreen" : "", (new_state & GDK_WINDOW_STATE_FULLSCREEN) ? " fullscreen" : "",
@ -1441,14 +1440,14 @@ xdg_toplevel_close (void *data,
GdkDisplay *display; GdkDisplay *display;
GdkEvent *event; GdkEvent *event;
GDK_NOTE (EVENTS, display = gdk_window_get_display (window);
g_message ("close %p", window));
GDK_DISPLAY_NOTE (display, EVENTS, g_message ("close %p", window));
event = gdk_event_new (GDK_DELETE); event = gdk_event_new (GDK_DELETE);
event->any.window = g_object_ref (window); event->any.window = g_object_ref (window);
event->any.send_event = TRUE; event->any.send_event = TRUE;
display = gdk_window_get_display (window);
_gdk_wayland_display_deliver_event (display, event); _gdk_wayland_display_deliver_event (display, event);
} }
@ -1546,8 +1545,7 @@ xdg_popup_done (void *data,
{ {
GdkWindow *window = GDK_WINDOW (data); GdkWindow *window = GDK_WINDOW (data);
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (gdk_window_get_display (window), EVENTS, g_message ("done %p", window));
g_message ("done %p", window));
gdk_window_hide (window); gdk_window_hide (window);
} }

View File

@ -64,17 +64,16 @@ print_atoms (GdkX11Clipboard *cb,
const Atom *atoms, const Atom *atoms,
gsize n_atoms) gsize n_atoms)
{ {
GDK_NOTE(CLIPBOARD, GdkDisplay *display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
GdkDisplay *display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
gsize i;
g_printerr ("%s: %s [ ", cb->selection, prefix); GDK_DISPLAY_NOTE (display, CLIPBOARD,
for (i = 0; i < n_atoms; i++) gsize i;
{
g_printerr ("%s%s", i > 0 ? ", " : "", gdk_x11_get_xatom_name_for_display (display , atoms[i])); g_printerr ("%s: %s [ ", cb->selection, prefix);
} for (i = 0; i < n_atoms; i++)
g_printerr (" ]\n"); g_printerr ("%s%s", i > 0 ? ", " : "", gdk_x11_get_xatom_name_for_display (display , atoms[i]));
); g_printerr (" ]\n");
);
} }
static void static void
@ -86,7 +85,11 @@ gdk_x11_clipboard_default_output_done (GObject *clipboard,
if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error)) if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: failed to write stream: %s\n", GDK_X11_CLIPBOARD (clipboard)->selection, error->message)); GdkDisplay *display = gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard));
GDK_DISPLAY_NOTE (display, CLIPBOARD,
g_printerr ("%s: failed to write stream: %s\n",
GDK_X11_CLIPBOARD (clipboard)->selection, error->message));
g_error_free (error); g_error_free (error);
} }
} }
@ -258,7 +261,9 @@ gdk_x11_clipboard_request_targets_finish (GObject *source_object,
bytes = g_input_stream_read_bytes_finish (stream, res, &error); bytes = g_input_stream_read_bytes_finish (stream, res, &error);
if (bytes == NULL) if (bytes == NULL)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: error reading TARGETS: %s\n", cb->selection, error->message)); GdkDisplay *display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
GDK_DISPLAY_NOTE (display, CLIPBOARD,
g_printerr ("%s: error reading TARGETS: %s\n", cb->selection, error->message));
g_error_free (error); g_error_free (error);
g_object_unref (stream); g_object_unref (stream);
g_object_unref (cb); g_object_unref (cb);
@ -290,7 +295,7 @@ gdk_x11_clipboard_request_targets_finish (GObject *source_object,
formats = gdk_x11_clipboard_formats_from_atoms (display, formats = gdk_x11_clipboard_formats_from_atoms (display,
g_bytes_get_data (bytes, NULL), g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes) / sizeof (Atom)); g_bytes_get_size (bytes) / sizeof (Atom));
GDK_NOTE(CLIPBOARD, char *s = gdk_content_formats_to_string (formats); g_printerr ("%s: got formats: %s\n", cb->selection, s); g_free (s)); GDK_DISPLAY_NOTE (display, CLIPBOARD, char *s = gdk_content_formats_to_string (formats); g_printerr ("%s: got formats: %s\n", cb->selection, s); g_free (s));
/* union with previously loaded formats */ /* union with previously loaded formats */
formats = gdk_content_formats_union (formats, gdk_clipboard_get_formats (GDK_CLIPBOARD (cb))); formats = gdk_content_formats_union (formats, gdk_clipboard_get_formats (GDK_CLIPBOARD (cb)));
@ -318,17 +323,18 @@ gdk_x11_clipboard_request_targets_got_stream (GObject *source,
const char *type; const char *type;
int format; int format;
display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
stream = gdk_x11_selection_input_stream_new_finish (result, &type, &format, &error); stream = gdk_x11_selection_input_stream_new_finish (result, &type, &format, &error);
if (stream == NULL) if (stream == NULL)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: can't request TARGETS: %s\n", cb->selection, error->message)); GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: can't request TARGETS: %s\n", cb->selection, error->message));
g_object_unref (cb); g_object_unref (cb);
g_error_free (error); g_error_free (error);
return; return;
} }
else if (!g_str_equal (type, "ATOM") || format != 32) else if (!g_str_equal (type, "ATOM") || format != 32)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: Wrong reply type to TARGETS: type %s != ATOM or format %d != 32\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: Wrong reply type to TARGETS: type %s != ATOM or format %d != 32\n",
cb->selection, type, format)); cb->selection, type, format));
g_input_stream_close (stream, NULL, NULL); g_input_stream_close (stream, NULL, NULL);
g_object_unref (stream); g_object_unref (stream);
@ -336,8 +342,6 @@ gdk_x11_clipboard_request_targets_got_stream (GObject *source,
return; return;
} }
display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
g_input_stream_read_bytes_async (stream, g_input_stream_read_bytes_async (stream,
gdk_x11_display_get_max_request_size (display), gdk_x11_display_get_max_request_size (display),
G_PRIORITY_DEFAULT, G_PRIORITY_DEFAULT,
@ -393,12 +397,13 @@ gdk_x11_clipboard_xevent (GdkDisplay *display,
if (xevent->xselectionclear.time < cb->timestamp) if (xevent->xselectionclear.time < cb->timestamp)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: ignoring SelectionClear with too old timestamp (%lu vs %lu)\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection, xevent->xselectionclear.time, cb->timestamp)); g_printerr ("%s: ignoring SelectionClear with too old timestamp (%lu vs %lu)\n",
cb->selection, xevent->xselectionclear.time, cb->timestamp));
return FALSE; return FALSE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionClear\n", cb->selection)); GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: got SelectionClear\n", cb->selection));
gdk_x11_clipboard_claim_remote (cb, xevent->xselectionclear.time); gdk_x11_clipboard_claim_remote (cb, xevent->xselectionclear.time);
return TRUE; return TRUE;
@ -415,13 +420,13 @@ gdk_x11_clipboard_xevent (GdkDisplay *display,
/* We already received a selectionNotify before */ /* We already received a selectionNotify before */
if (cb->store_task == NULL) if (cb->store_task == NULL)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionNotify for nonexisting task?!\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection)); g_printerr ("%s: got SelectionNotify for nonexisting task?!\n", cb->selection));
return FALSE; return FALSE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionNotify for store task\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection)); g_printerr ("%s: got SelectionNotify for store task\n", cb->selection));
if (xevent->xselection.property != None) if (xevent->xselection.property != None)
g_task_return_boolean (cb->store_task, TRUE); g_task_return_boolean (cb->store_task, TRUE);
@ -447,19 +452,21 @@ gdk_x11_clipboard_xevent (GdkDisplay *display,
if (!gdk_clipboard_is_local (GDK_CLIPBOARD (cb))) if (!gdk_clipboard_is_local (GDK_CLIPBOARD (cb)))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionRequest for %s @ %s even though we don't own the selection, huh?\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection, target, property)); g_printerr ("%s: got SelectionRequest for %s @ %s even though we don't own the selection, huh?\n",
cb->selection, target, property));
return TRUE; return TRUE;
} }
if (xevent->xselectionrequest.requestor == None) if (xevent->xselectionrequest.requestor == None)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionRequest for %s @ %s with NULL window, ignoring\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection, target, property)); g_printerr ("%s: got SelectionRequest for %s @ %s with NULL window, ignoring\n",
cb->selection, target, property));
return TRUE; return TRUE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: got SelectionRequest for %s @ %s\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection, target, property)); g_printerr ("%s: got SelectionRequest for %s @ %s\n", cb->selection, target, property));
gdk_x11_selection_output_streams_create (display, gdk_x11_selection_output_streams_create (display,
gdk_clipboard_get_formats (GDK_CLIPBOARD (cb)), gdk_clipboard_get_formats (GDK_CLIPBOARD (cb)),
@ -485,13 +492,13 @@ gdk_x11_clipboard_xevent (GdkDisplay *display,
if (sn->owner == GDK_X11_DISPLAY (display)->leader_window) if (sn->owner == GDK_X11_DISPLAY (display)->leader_window)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: Ignoring XFixesSelectionNotify for ourselves\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection)); g_printerr ("%s: Ignoring XFixesSelectionNotify for ourselves\n", cb->selection));
return FALSE; return FALSE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: Received XFixesSelectionNotify, claiming selection\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection)); g_printerr ("%s: Received XFixesSelectionNotify, claiming selection\n", cb->selection));
gdk_x11_clipboard_claim_remote (cb, sn->selection_timestamp); gdk_x11_clipboard_claim_remote (cb, sn->selection_timestamp);
} }
@ -535,7 +542,7 @@ gdk_x11_clipboard_claim (GdkClipboard *clipboard,
if (XGetSelectionOwner (xdisplay, cb->xselection) != xwindow) if (XGetSelectionOwner (xdisplay, cb->xselection) != xwindow)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: failed XSetSelectionOwner()\n", cb->selection)); GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: failed XSetSelectionOwner()\n", cb->selection));
return FALSE; return FALSE;
} }
} }
@ -545,7 +552,7 @@ gdk_x11_clipboard_claim (GdkClipboard *clipboard,
} }
cb->timestamp = time; cb->timestamp = time;
GDK_NOTE(CLIPBOARD, g_printerr ("%s: claimed via XSetSelectionOwner()\n", cb->selection)); GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: claimed via XSetSelectionOwner()\n", cb->selection));
} }
return GDK_CLIPBOARD_CLASS (gdk_x11_clipboard_parent_class)->claim (clipboard, formats, local, content); return GDK_CLIPBOARD_CLASS (gdk_x11_clipboard_parent_class)->claim (clipboard, formats, local, content);
@ -571,8 +578,7 @@ gdk_x11_clipboard_store_async (GdkClipboard *clipboard,
/* clipboard managers don't work on anythig but the clipbpoard selection */ /* clipboard managers don't work on anythig but the clipbpoard selection */
if (!g_str_equal (cb->selection, "CLIPBOARD")) if (!g_str_equal (cb->selection, "CLIPBOARD"))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: can only store on CLIPBOARD\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: can only store on CLIPBOARD\n", cb->selection));
cb->selection));
GDK_CLIPBOARD_CLASS (gdk_x11_clipboard_parent_class)->store_async (clipboard, GDK_CLIPBOARD_CLASS (gdk_x11_clipboard_parent_class)->store_async (clipboard,
io_priority, io_priority,
cancellable, cancellable,
@ -590,8 +596,9 @@ gdk_x11_clipboard_store_async (GdkClipboard *clipboard,
if (XGetSelectionOwner (xdisplay, clipboard_manager) == None) if (XGetSelectionOwner (xdisplay, clipboard_manager) == None)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: XGetSelectionOwner (CLIPBOARD_MANAGER) returned None, aborting.\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection)); g_printerr ("%s: XGetSelectionOwner (CLIPBOARD_MANAGER) returned None, aborting.\n",
cb->selection));
g_task_return_new_error (cb->store_task, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, g_task_return_new_error (cb->store_task, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
_("Cannot store clipboard. No clipboard manager is active.")); _("Cannot store clipboard. No clipboard manager is active."));
g_clear_object (&cb->store_task); g_clear_object (&cb->store_task);
@ -601,8 +608,7 @@ gdk_x11_clipboard_store_async (GdkClipboard *clipboard,
content = gdk_clipboard_get_content (clipboard); content = gdk_clipboard_get_content (clipboard);
if (content == NULL) if (content == NULL)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: storing empty clipboard: SUCCESS!\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: storing empty clipboard: SUCCESS!\n", cb->selection));
cb->selection));
g_task_return_boolean (cb->store_task, TRUE); g_task_return_boolean (cb->store_task, TRUE);
g_clear_object (&cb->store_task); g_clear_object (&cb->store_task);
return; return;
@ -634,8 +640,8 @@ gdk_x11_clipboard_store_async (GdkClipboard *clipboard,
error = gdk_x11_display_error_trap_pop (display); error = gdk_x11_display_error_trap_pop (display);
if (error != Success) if (error != Success)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("%s: X error during ConvertSelection() while storing selection: %d\n", GDK_DISPLAY_NOTE (display, CLIPBOARD,
cb->selection, error)); g_printerr ("%s: X error during ConvertSelection() while storing selection: %d\n", cb->selection, error));
} }
} }
@ -672,8 +678,9 @@ gdk_x11_clipboard_read_got_stream (GObject *source,
{ {
GdkX11Clipboard *cb = GDK_X11_CLIPBOARD (g_task_get_source_object (task)); GdkX11Clipboard *cb = GDK_X11_CLIPBOARD (g_task_get_source_object (task));
GDK_NOTE(CLIPBOARD, g_printerr ("%s: reading %s failed, trying %s next\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD(cb)), CLIPBOARD,
cb->selection, (char *) targets->data, (char *) next->data)); g_printerr ("%s: reading %s failed, trying %s next\n",
cb->selection, (char *) targets->data, (char *) next->data));
targets->next = NULL; targets->next = NULL;
g_task_set_task_data (task, next, (GDestroyNotify) g_slist_free); g_task_set_task_data (task, next, (GDestroyNotify) g_slist_free);
gdk_x11_selection_input_stream_new_async (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), gdk_x11_selection_input_stream_new_async (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)),
@ -702,8 +709,9 @@ gdk_x11_clipboard_read_got_stream (GObject *source,
{ {
g_assert (special_targets[i].mime_type != NULL); g_assert (special_targets[i].mime_type != NULL);
GDK_NOTE(CLIPBOARD, g_printerr ("%s: reading with converter from %s to %s\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD,
cb->selection, mime_type, special_targets[i].mime_type)); g_printerr ("%s: reading with converter from %s to %s\n",
cb->selection, mime_type, special_targets[i].mime_type));
mime_type = g_intern_string (special_targets[i].mime_type); mime_type = g_intern_string (special_targets[i].mime_type);
g_task_set_task_data (task, g_slist_prepend (NULL, (gpointer) mime_type), (GDestroyNotify) g_slist_free); g_task_set_task_data (task, g_slist_prepend (NULL, (gpointer) mime_type), (GDestroyNotify) g_slist_free);
stream = special_targets[i].convert (cb, stream, type, format); stream = special_targets[i].convert (cb, stream, type, format);
@ -711,8 +719,8 @@ gdk_x11_clipboard_read_got_stream (GObject *source,
} }
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: reading clipboard as %s now\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD,
cb->selection, mime_type)); g_printerr ("%s: reading clipboard as %s now\n", cb->selection, mime_type));
g_task_return_pointer (task, stream, g_object_unref); g_task_return_pointer (task, stream, g_object_unref);
} }
@ -744,8 +752,9 @@ gdk_x11_clipboard_read_async (GdkClipboard *clipboard,
return; return;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("%s: new read for %s (%u other options)\n", GDK_DISPLAY_NOTE (gdk_clipboard_get_display (clipboard), CLIPBOARD,
cb->selection, (char *) targets->data, g_slist_length (targets->next))); g_printerr ("%s: new read for %s (%u other options)\n",
cb->selection, (char *) targets->data, g_slist_length (targets->next)));
gdk_x11_selection_input_stream_new_async (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), gdk_x11_selection_input_stream_new_async (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)),
cb->selection, cb->selection,
targets->data, targets->data,

View File

@ -353,7 +353,7 @@ gdk_x11_device_core_grab (GdkDevice *device,
xconfine_to = GDK_WINDOW_XID (confine_to); xconfine_to = GDK_WINDOW_XID (confine_to);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (NOGRABS)) if (GDK_DISPLAY_DEBUG_CHECK (display, NOGRABS))
status = GrabSuccess; status = GrabSuccess;
else else
#endif #endif

View File

@ -451,19 +451,19 @@ gdk_x11_device_xi2_grab (GdkDevice *device,
event_mask, event_mask,
&mask.mask_len); &mask.mask_len);
#ifdef G_ENABLE_DEBUG #if G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (NOGRABS)) if (GDK_DISPLAY_DEBUG_CHECK (display, NOGRABS))
status = GrabSuccess; status = GrabSuccess;
else else
#endif #endif
status = XIGrabDevice (GDK_DISPLAY_XDISPLAY (display), status = XIGrabDevice (GDK_DISPLAY_XDISPLAY (display),
device_xi2->device_id, device_xi2->device_id,
xwindow, xwindow,
time_, time_,
xcursor, xcursor,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
owner_events, owner_events,
&mask); &mask);
g_free (mask.mask); g_free (mask.mask);

View File

@ -223,7 +223,7 @@ translate_key_event (GdkDisplay *display,
_gdk_x11_event_translate_keyboard_string (&event->key); _gdk_x11_event_translate_keyboard_string (&event->key);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (EVENTS)) if (GDK_DISPLAY_DEBUG_CHECK (display, EVENTS))
{ {
g_message ("%s:\t\twindow: %ld key: %12s %d", g_message ("%s:\t\twindow: %ld key: %12s %d",
event->any.type == GDK_KEY_PRESS ? "key press " : "key release", event->any.type == GDK_KEY_PRESS ? "key press " : "key release",
@ -467,7 +467,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
break; break;
case ButtonPress: case ButtonPress:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("button press:\t\twindow: %ld x,y: %d %d button: %d", g_message ("button press:\t\twindow: %ld x,y: %d %d button: %d",
xevent->xbutton.window, xevent->xbutton.window,
xevent->xbutton.x, xevent->xbutton.y, xevent->xbutton.x, xevent->xbutton.y,
@ -537,7 +537,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
break; break;
case ButtonRelease: case ButtonRelease:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("button release:\twindow: %ld x,y: %d %d button: %d", g_message ("button release:\twindow: %ld x,y: %d %d button: %d",
xevent->xbutton.window, xevent->xbutton.window,
xevent->xbutton.x, xevent->xbutton.y, xevent->xbutton.x, xevent->xbutton.y,
@ -574,7 +574,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
break; break;
case MotionNotify: case MotionNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("motion notify:\t\twindow: %ld x,y: %d %d hint: %s", g_message ("motion notify:\t\twindow: %ld x,y: %d %d hint: %s",
xevent->xmotion.window, xevent->xmotion.window,
xevent->xmotion.x, xevent->xmotion.y, xevent->xmotion.x, xevent->xmotion.y,
@ -603,7 +603,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
break; break;
case EnterNotify: case EnterNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("enter notify:\t\twindow: %ld detail: %d subwin: %ld", g_message ("enter notify:\t\twindow: %ld detail: %d subwin: %ld",
xevent->xcrossing.window, xevent->xcrossing.window,
xevent->xcrossing.detail, xevent->xcrossing.detail,
@ -644,7 +644,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
break; break;
case LeaveNotify: case LeaveNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("leave notify:\t\twindow: %ld detail: %d subwin: %ld", g_message ("leave notify:\t\twindow: %ld detail: %d subwin: %ld",
xevent->xcrossing.window, xevent->xcrossing.window,
xevent->xcrossing.detail, xevent->xcrossing.subwindow)); xevent->xcrossing.detail, xevent->xcrossing.subwindow));
@ -808,7 +808,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (source_device == NULL || GDK_IS_DEVICE (source_device)); g_return_if_fail (source_device == NULL || GDK_IS_DEVICE (source_device));
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (gdk_window_get_display (window), EVENTS,
g_message ("focus out:\t\twindow: %ld, detail: %s, mode: %s", g_message ("focus out:\t\twindow: %ld, detail: %s, mode: %s",
GDK_WINDOW_XID (window), GDK_WINDOW_XID (window),
notify_details[detail], notify_details[detail],

View File

@ -57,7 +57,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
{ {
GdkX11DeviceManagerXI2 *device_manager_xi2; GdkX11DeviceManagerXI2 *device_manager_xi2;
GDK_NOTE (INPUT, g_message ("Creating XI2 device manager")); GDK_DISPLAY_NOTE (display, INPUT, g_message ("Creating XI2 device manager"));
device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2, device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
"display", display, "display", display,
@ -72,7 +72,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
#endif /* XINPUT_2 */ #endif /* XINPUT_2 */
} }
GDK_NOTE (INPUT, g_message ("Creating core device manager")); GDK_DISPLAY_NOTE (display, INPUT, g_message ("Creating core device manager"));
return g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_CORE, return g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_CORE,
"display", display, "display", display,

View File

@ -193,7 +193,7 @@ translate_valuator_class (GdkDisplay *display,
label = NULL; label = NULL;
_gdk_device_add_axis (device, label, use, min, max, resolution); _gdk_device_add_axis (device, label, use, min, max, resolution);
GDK_NOTE (INPUT, g_message ("\n\taxis: %s %s", (const char *)label, use == GDK_AXIS_IGNORE ? "(ignored)" : "(used)")); GDK_DISPLAY_NOTE (display, INPUT, g_message ("\n\taxis: %s %s", (const char *)label, use == GDK_AXIS_IGNORE ? "(ignored)" : "(used)"));
} }
static void static void
@ -244,7 +244,7 @@ translate_device_classes (GdkDisplay *display,
else else
direction = GDK_SCROLL_RIGHT; direction = GDK_SCROLL_RIGHT;
GDK_NOTE (INPUT, GDK_DISPLAY_NOTE (display, INPUT,
g_message ("\n\tscroll valuator %d: %s, increment %f", g_message ("\n\tscroll valuator %d: %s, increment %f",
scroll_info->number, scroll_info->number,
scroll_info->scroll_type == XIScrollTypeVertical scroll_info->scroll_type == XIScrollTypeVertical
@ -471,7 +471,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager,
break; break;
} }
GDK_NOTE (INPUT, GDK_DISPLAY_NOTE (display, INPUT,
({ ({
const gchar *type_names[] = { "master", "slave", "floating" }; const gchar *type_names[] = { "master", "slave", "floating" };
const gchar *source_names[] = { "mouse", "pen", "eraser", "cursor", "keyboard", "direct touch", "indirect touch", "trackpoint", "pad" }; const gchar *source_names[] = { "mouse", "pen", "eraser", "cursor", "keyboard", "direct touch", "indirect touch", "trackpoint", "pad" };
@ -1410,7 +1410,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
GdkKeymap *keymap = gdk_display_get_keymap (display); GdkKeymap *keymap = gdk_display_get_keymap (display);
GdkModifierType consumed, state; GdkModifierType consumed, state;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("key %s:\twindow %ld\n" g_message ("key %s:\twindow %ld\n"
"\tdevice:%u\n" "\tdevice:%u\n"
"\tsource device:%u\n" "\tsource device:%u\n"
@ -1470,7 +1470,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
{ {
XIDeviceEvent *xev = (XIDeviceEvent *) ev; XIDeviceEvent *xev = (XIDeviceEvent *) ev;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("button %s:\twindow %ld\n" g_message ("button %s:\twindow %ld\n"
"\tdevice:%u\n" "\tdevice:%u\n"
"\tsource device:%u\n" "\tsource device:%u\n"
@ -1607,7 +1607,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
if (delta_x == 0.0 && delta_y == 0.0) if (delta_x == 0.0 && delta_y == 0.0)
event->scroll.is_stop = TRUE; event->scroll.is_stop = TRUE;
GDK_NOTE(EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("smooth scroll: \n\tdevice: %u\n\tsource device: %u\n\twindow %ld\n\tdeltas: %f %f", g_message ("smooth scroll: \n\tdevice: %u\n\tsource device: %u\n\twindow %ld\n\tdeltas: %f %f",
xev->deviceid, xev->sourceid, xev->deviceid, xev->sourceid,
xev->event, delta_x, delta_y)); xev->event, delta_x, delta_y));
@ -1667,7 +1667,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
{ {
XIDeviceEvent *xev = (XIDeviceEvent *) ev; XIDeviceEvent *xev = (XIDeviceEvent *) ev;
GDK_NOTE(EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("touch %s:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s", g_message ("touch %s:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s",
ev->evtype == XI_TouchBegin ? "begin" : "end", ev->evtype == XI_TouchBegin ? "begin" : "end",
xev->event, xev->event,
@ -1734,7 +1734,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
{ {
XIDeviceEvent *xev = (XIDeviceEvent *) ev; XIDeviceEvent *xev = (XIDeviceEvent *) ev;
GDK_NOTE(EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("touch update:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s", g_message ("touch update:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s",
xev->event, xev->event,
xev->detail, xev->detail,
@ -1788,7 +1788,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
{ {
XIEnterEvent *xev = (XIEnterEvent *) ev; XIEnterEvent *xev = (XIEnterEvent *) ev;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("%s notify:\twindow %ld\n\tsubwindow:%ld\n" g_message ("%s notify:\twindow %ld\n\tsubwindow:%ld\n"
"\tdevice: %u\n\tsource device: %u\n" "\tdevice: %u\n\tsource device: %u\n"
"\tnotify type: %u\n\tcrossing mode: %u", "\tnotify type: %u\n\tcrossing mode: %u",

View File

@ -703,15 +703,14 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
switch (xevent->type) switch (xevent->type)
{ {
case KeymapNotify: case KeymapNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS, g_message ("keymap notify"));
g_message ("keymap notify"));
/* Not currently handled */ /* Not currently handled */
return_val = FALSE; return_val = FALSE;
break; break;
case Expose: case Expose:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d%s", g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d%s",
xevent->xexpose.window, xevent->xexpose.count, xevent->xexpose.window, xevent->xexpose.count,
xevent->xexpose.x, xevent->xexpose.y, xevent->xexpose.x, xevent->xexpose.y,
@ -748,7 +747,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkRectangle expose_rect; GdkRectangle expose_rect;
int x2, y2; int x2, y2;
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("graphics expose:\tdrawable: %ld", g_message ("graphics expose:\tdrawable: %ld",
xevent->xgraphicsexpose.drawable)); xevent->xgraphicsexpose.drawable));
@ -774,7 +773,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
case VisibilityNotify: case VisibilityNotify:
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (EVENTS)) if (GDK_DISPLAY_DEBUG_CHECK (display, EVENTS))
switch (xevent->xvisibility.state) switch (xevent->xvisibility.state)
{ {
case VisibilityFullyObscured: case VisibilityFullyObscured:
@ -798,7 +797,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case CreateNotify: case CreateNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("create notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d parent: %ld ovr: %d", g_message ("create notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d parent: %ld ovr: %d",
xevent->xcreatewindow.window, xevent->xcreatewindow.window,
xevent->xcreatewindow.x, xevent->xcreatewindow.x,
@ -812,7 +811,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case DestroyNotify: case DestroyNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("destroy notify:\twindow: %ld", g_message ("destroy notify:\twindow: %ld",
xevent->xdestroywindow.window)); xevent->xdestroywindow.window));
@ -832,7 +831,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case UnmapNotify: case UnmapNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("unmap notify:\t\twindow: %ld", g_message ("unmap notify:\t\twindow: %ld",
xevent->xmap.window)); xevent->xmap.window));
@ -876,7 +875,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case MapNotify: case MapNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("map notify:\t\twindow: %ld", g_message ("map notify:\t\twindow: %ld",
xevent->xmap.window)); xevent->xmap.window));
@ -898,7 +897,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case ReparentNotify: case ReparentNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d", g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d",
xevent->xreparent.window, xevent->xreparent.window,
xevent->xreparent.x, xevent->xreparent.x,
@ -911,7 +910,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case ConfigureNotify: case ConfigureNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d%s", g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d%s",
xevent->xconfigure.window, xevent->xconfigure.window,
xevent->xconfigure.x, xevent->xconfigure.x,
@ -1008,7 +1007,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case PropertyNotify: case PropertyNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("property notify:\twindow: %ld, atom(%ld): %s%s%s", g_message ("property notify:\twindow: %ld, atom(%ld): %s%s%s",
xevent->xproperty.window, xevent->xproperty.window,
xevent->xproperty.atom, xevent->xproperty.atom,
@ -1042,7 +1041,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case ColormapNotify: case ColormapNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("colormap notify:\twindow: %ld", g_message ("colormap notify:\twindow: %ld",
xevent->xcolormap.window)); xevent->xcolormap.window));
@ -1051,7 +1050,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case ClientMessage: case ClientMessage:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("client message:\twindow: %ld", g_message ("client message:\twindow: %ld",
xevent->xclient.window)); xevent->xclient.window));
@ -1060,7 +1059,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
break; break;
case MappingNotify: case MappingNotify:
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("mapping notify")); g_message ("mapping notify"));
/* Let XLib know that there is a new keyboard mapping. /* Let XLib know that there is a new keyboard mapping.
@ -1272,7 +1271,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
timings->complete = TRUE; timings->complete = TRUE;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (FRAMES)) if (GDK_DISPLAY_DEBUG_CHECK (display, FRAMES))
_gdk_frame_clock_debug_print_timings (clock, timings); _gdk_frame_clock_debug_print_timings (clock, timings);
#endif /* G_ENABLE_DEBUG */ #endif /* G_ENABLE_DEBUG */
} }
@ -1294,7 +1293,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
* the event is passed along to the program, * the event is passed along to the program,
* which should then destroy the window. * which should then destroy the window.
*/ */
GDK_NOTE (EVENTS, GDK_DISPLAY_NOTE (display, EVENTS,
g_message ("delete window:\t\twindow: %ld", g_message ("delete window:\t\twindow: %ld",
xevent->xclient.window)); xevent->xclient.window));

View File

@ -266,7 +266,7 @@ gdk_x11_drag_context_read_got_stream (GObject *source,
{ {
GdkDragContext *context = GDK_DRAG_CONTEXT (g_task_get_source_object (task)); GdkDragContext *context = GDK_DRAG_CONTEXT (g_task_get_source_object (task));
GDK_NOTE (DND, g_printerr ("reading %s failed, trying %s next\n", GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND, g_printerr ("reading %s failed, trying %s next\n",
(char *) targets->data, (char *) next->data)); (char *) targets->data, (char *) next->data));
targets->next = NULL; targets->next = NULL;
g_task_set_task_data (task, next, (GDestroyNotify) g_slist_free); g_task_set_task_data (task, next, (GDestroyNotify) g_slist_free);
@ -296,7 +296,7 @@ gdk_x11_drag_context_read_got_stream (GObject *source,
{ {
g_assert (special_targets[i].mime_type != NULL); g_assert (special_targets[i].mime_type != NULL);
GDK_NOTE(CLIPBOARD, g_printerr ("%s: reading with converter from %s to %s\n", GDK_DISPLAY_NOTE (CLIPBOARD, g_printerr ("%s: reading with converter from %s to %s\n",
cb->selection, mime_type, special_targets[i].mime_type)); cb->selection, mime_type, special_targets[i].mime_type));
mime_type = g_intern_string (special_targets[i].mime_type); mime_type = g_intern_string (special_targets[i].mime_type);
g_task_set_task_data (task, g_slist_prepend (NULL, (gpointer) mime_type), (GDestroyNotify) g_slist_free); g_task_set_task_data (task, g_slist_prepend (NULL, (gpointer) mime_type), (GDestroyNotify) g_slist_free);
@ -306,7 +306,7 @@ gdk_x11_drag_context_read_got_stream (GObject *source,
} }
#endif #endif
GDK_NOTE(DND, g_printerr ("reading DND as %s now\n", GDK_NOTE (DND, g_printerr ("reading DND as %s now\n",
mime_type)); mime_type));
g_task_return_pointer (task, stream, g_object_unref); g_task_return_pointer (task, stream, g_object_unref);
} }
@ -338,7 +338,7 @@ gdk_x11_drag_context_read_async (GdkDragContext *context,
return; return;
} }
GDK_NOTE(DND, g_printerr ("new read for %s (%u other options)\n", GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND, g_printerr ("new read for %s (%u other options)\n",
(char *) targets->data, g_slist_length (targets->next))); (char *) targets->data, g_slist_length (targets->next)));
gdk_x11_selection_input_stream_new_async (gdk_drag_context_get_display (context), gdk_x11_selection_input_stream_new_async (gdk_drag_context_get_display (context),
"XdndSelection", "XdndSelection",
@ -1057,13 +1057,13 @@ xdnd_status_filter (GdkXEvent *xev,
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN) gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */ return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndStatus: dest_window: %#x action: %ld",
dest_window, action));
display = gdk_window_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window); context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndStatus: dest_window: %#x action: %ld",
dest_window, action));
if (context) if (context)
{ {
GdkX11DragContext *context_x11 = GDK_X11_DRAG_CONTEXT (context); GdkX11DragContext *context_x11 = GDK_X11_DRAG_CONTEXT (context);
@ -1072,7 +1072,7 @@ xdnd_status_filter (GdkXEvent *xev,
if (!(action != 0) != !(flags & 1)) if (!(action != 0) != !(flags & 1))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_warning ("Received status event with flags not corresponding to action!")); g_warning ("Received status event with flags not corresponding to action!"));
action = 0; action = 0;
} }
@ -1104,12 +1104,12 @@ xdnd_finished_filter (GdkXEvent *xev,
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN) gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */ return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndFinished: dest_window: %#x", dest_window));
display = gdk_window_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window); context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndFinished: dest_window: %#x", dest_window));
if (context) if (context)
{ {
g_object_ref (context); g_object_ref (context);
@ -1205,7 +1205,7 @@ send_client_message_async_cb (Window window,
gpointer data) gpointer data)
{ {
GdkDragContext *context = data; GdkDragContext *context = data;
GDK_NOTE (DND, GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND,
g_message ("Got async callback for #%lx, success = %d", g_message ("Got async callback for #%lx, success = %d",
window, success)); window, success));
@ -1320,7 +1320,7 @@ xdnd_send_enter (GdkX11DragContext *context_x11)
xev.xclient.data.l[3] = 0; xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0; xev.xclient.data.l[4] = 0;
GDK_NOTE(DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Sending enter source window %#lx XDND protocol version %d\n", g_message ("Sending enter source window %#lx XDND protocol version %d\n",
GDK_WINDOW_XID (context_x11->ipc_window), context_x11->version)); GDK_WINDOW_XID (context_x11->ipc_window), context_x11->version));
atoms = gdk_content_formats_get_mime_types (context->formats, &n_atoms); atoms = gdk_content_formats_get_mime_types (context->formats, &n_atoms);
@ -1341,7 +1341,7 @@ xdnd_send_enter (GdkX11DragContext *context_x11)
if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev)) if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window))); GDK_WINDOW_XID (context->dest_window)));
g_object_unref (context->dest_window); g_object_unref (context->dest_window);
@ -1370,7 +1370,7 @@ xdnd_send_leave (GdkX11DragContext *context_x11)
if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev)) if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window))); GDK_WINDOW_XID (context->dest_window)));
g_object_unref (context->dest_window); g_object_unref (context->dest_window);
@ -1400,7 +1400,7 @@ xdnd_send_drop (GdkX11DragContext *context_x11,
if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev)) if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window))); GDK_WINDOW_XID (context->dest_window)));
g_object_unref (context->dest_window); g_object_unref (context->dest_window);
@ -1433,7 +1433,7 @@ xdnd_send_motion (GdkX11DragContext *context_x11,
if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev)) if (!xdnd_send_xevent (context_x11, context->dest_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window))); GDK_WINDOW_XID (context->dest_window)));
g_object_unref (context->dest_window); g_object_unref (context->dest_window);
@ -1477,7 +1477,7 @@ xdnd_check_dest (GdkDisplay *display,
} }
else else
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_warning ("Invalid XdndProxy property on window %ld", win)); g_warning ("Invalid XdndProxy property on window %ld", win));
} }
@ -1502,7 +1502,7 @@ xdnd_check_dest (GdkDisplay *display,
} }
else else
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_warning ("Invalid XdndAware property on window %ld", win)); g_warning ("Invalid XdndAware property on window %ld", win));
} }
@ -1554,7 +1554,7 @@ xdnd_read_actions (GdkX11DragContext *context_x11)
context_x11->xdnd_have_actions = TRUE; context_x11->xdnd_have_actions = TRUE;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (DND)) if (GDK_DISPLAY_DEBUG_CHECK (display, DND))
{ {
GString *action_str = g_string_new (NULL); GString *action_str = g_string_new (NULL);
if (context->actions & GDK_ACTION_MOVE) if (context->actions & GDK_ACTION_MOVE)
@ -1742,14 +1742,14 @@ xdnd_enter_filter (GdkXEvent *xev,
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndEnter: source_window: %#x, version: %#x", g_message ("XdndEnter: source_window: %#x, version: %#x",
source_window, version)); source_window, version));
if (version < 3) if (version < 3)
{ {
/* Old source ignore */ /* Old source ignore */
GDK_NOTE (DND, g_message ("Ignored old XdndEnter message")); GDK_DISPLAY_NOTE (display, DND, g_message ("Ignored old XdndEnter message"));
return GDK_FILTER_REMOVE; return GDK_FILTER_REMOVE;
} }
@ -1820,7 +1820,7 @@ xdnd_enter_filter (GdkXEvent *xev,
g_ptr_array_unref (formats); g_ptr_array_unref (formats);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (DND)) if (GDK_DISPLAY_DEBUG_CHECK (display, DND))
print_target_list (context->formats); print_target_list (context->formats);
#endif /* G_ENABLE_DEBUG */ #endif /* G_ENABLE_DEBUG */
@ -1851,13 +1851,13 @@ xdnd_leave_filter (GdkXEvent *xev,
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN) gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */ return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndLeave: source_window: %#x",
source_window));
display = GDK_WINDOW_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_X11_DISPLAY (display); display_x11 = GDK_X11_DISPLAY (display);
GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndLeave: source_window: %#x",
source_window));
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
if ((display_x11->current_dest_drag != NULL) && if ((display_x11->current_dest_drag != NULL) &&
@ -1898,13 +1898,13 @@ xdnd_position_filter (GdkXEvent *xev,
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN) gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */ return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
source_window, x_root, y_root, time, action));
display = GDK_WINDOW_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_X11_DISPLAY (display); display_x11 = GDK_X11_DISPLAY (display);
GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
source_window, x_root, y_root, time, action));
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
context = display_x11->current_dest_drag; context = display_x11->current_dest_drag;
@ -1958,13 +1958,13 @@ xdnd_drop_filter (GdkXEvent *xev,
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN) gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */ return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndDrop: source_window: %#x time: %d",
source_window, time));
display = GDK_WINDOW_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_X11_DISPLAY (display); display_x11 = GDK_X11_DISPLAY (display);
GDK_DISPLAY_NOTE (display, DND,
g_message ("XdndDrop: source_window: %#x time: %d",
source_window, time));
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
context = display_x11->current_dest_drag; context = display_x11->current_dest_drag;
@ -2084,13 +2084,13 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay *display,
*protocol = GDK_DRAG_PROTO_XDND; *protocol = GDK_DRAG_PROTO_XDND;
*version = 5; *version = 5;
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
GDK_NOTE (DND, g_message ("Entering local Xdnd window %#x\n", (guint) xid)); GDK_DISPLAY_NOTE (display, DND, g_message ("Entering local Xdnd window %#x\n", (guint) xid));
return xid; return xid;
} }
else if (_gdk_x11_display_is_root_window (display, xid)) else if (_gdk_x11_display_is_root_window (display, xid))
{ {
*protocol = GDK_DRAG_PROTO_ROOTWIN; *protocol = GDK_DRAG_PROTO_ROOTWIN;
GDK_NOTE (DND, g_message ("Entering root window\n")); GDK_DISPLAY_NOTE (display, DND, g_message ("Entering root window\n"));
return xid; return xid;
} }
} }
@ -2098,7 +2098,7 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay *display,
{ {
*protocol = GDK_DRAG_PROTO_XDND; *protocol = GDK_DRAG_PROTO_XDND;
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
GDK_NOTE (DND, g_message ("Entering Xdnd window %#x\n", (guint) xid)); GDK_DISPLAY_NOTE (display, DND, g_message ("Entering Xdnd window %#x\n", (guint) xid));
return retval; return retval;
} }
else else
@ -2111,7 +2111,7 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay *display,
if (rootwin) if (rootwin)
{ {
GDK_NOTE (DND, g_message ("Entering root window\n")); GDK_DISPLAY_NOTE (display, DND, g_message ("Entering root window\n"));
*protocol = GDK_DRAG_PROTO_ROOTWIN; *protocol = GDK_DRAG_PROTO_ROOTWIN;
return xid; return xid;
} }
@ -2451,7 +2451,7 @@ gdk_x11_drag_context_drag_status (GdkDragContext *context,
xev.xclient.data.l[4] = xdnd_action_to_atom (display, action); xev.xclient.data.l[4] = xdnd_action_to_atom (display, action);
if (!xdnd_send_xevent (context_x11, context->source_window, FALSE, &xev)) if (!xdnd_send_xevent (context_x11, context->source_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->source_window))); GDK_WINDOW_XID (context->source_window)));
} }
@ -2510,7 +2510,7 @@ gdk_x11_drag_context_drop_finish (GdkDragContext *context,
if (!xdnd_send_xevent (GDK_X11_DRAG_CONTEXT (context), context->source_window, FALSE, &xev)) if (!xdnd_send_xevent (GDK_X11_DRAG_CONTEXT (context), context->source_window, FALSE, &xev))
{ {
GDK_NOTE (DND, GDK_DISPLAY_NOTE (display, DND,
g_message ("Send event to %lx failed", g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->source_window))); GDK_WINDOW_XID (context->source_window)));
} }
@ -2580,7 +2580,7 @@ gdk_x11_drag_context_default_output_done (GObject *context,
if (!gdk_drag_context_write_finish (GDK_DRAG_CONTEXT (context), result, &error)) if (!gdk_drag_context_write_finish (GDK_DRAG_CONTEXT (context), result, &error))
{ {
GDK_NOTE(DND, g_printerr ("failed to write stream: %s\n", error->message)); GDK_DISPLAY_NOTE (gdk_drag_context_get_display (GDK_DRAG_CONTEXT (context)), DND, g_printerr ("failed to write stream: %s\n", error->message));
g_error_free (error); g_error_free (error);
} }
} }
@ -2624,12 +2624,12 @@ gdk_x11_drag_context_xevent (GdkDisplay *display,
if (xevent->xselectionclear.time < x11_context->timestamp) if (xevent->xselectionclear.time < x11_context->timestamp)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("ignoring SelectionClear with too old timestamp (%lu vs %lu)\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("ignoring SelectionClear with too old timestamp (%lu vs %lu)\n",
xevent->xselectionclear.time, x11_context->timestamp)); xevent->xselectionclear.time, x11_context->timestamp));
return FALSE; return FALSE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("got SelectionClear, aborting DND\n")); GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("got SelectionClear, aborting DND\n"));
gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR); gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR);
return TRUE; return TRUE;
@ -2648,12 +2648,12 @@ gdk_x11_drag_context_xevent (GdkDisplay *display,
if (xevent->xselectionrequest.requestor == None) if (xevent->xselectionrequest.requestor == None)
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("got SelectionRequest for %s @ %s with NULL window, ignoring\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("got SelectionRequest for %s @ %s with NULL window, ignoring\n",
target, property)); target, property));
return TRUE; return TRUE;
} }
GDK_NOTE(CLIPBOARD, g_printerr ("got SelectionRequest for %s @ %s\n", GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("got SelectionRequest for %s @ %s\n",
target, property)); target, property));
gdk_x11_selection_output_streams_create (display, gdk_x11_selection_output_streams_create (display,
@ -3011,7 +3011,7 @@ _gdk_x11_window_drag_begin (GdkWindow *window,
x11_context->timestamp); x11_context->timestamp);
if (XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), xselection) != GDK_WINDOW_XID (x11_context->ipc_window)) if (XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), xselection) != GDK_WINDOW_XID (x11_context->ipc_window))
{ {
GDK_NOTE(DND, g_printerr ("failed XSetSelectionOwner() on \"XdndSelection\", aborting DND\n")); GDK_DISPLAY_NOTE (display, DND, g_printerr ("failed XSetSelectionOwner() on \"XdndSelection\", aborting DND\n"));
g_object_unref (context); g_object_unref (context);
return NULL; return NULL;
} }

View File

@ -143,7 +143,7 @@ gdk_x11_gl_context_end_frame (GdkDrawContext *draw_context,
drawable = context_x11->attached_drawable; drawable = context_x11->attached_drawable;
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Flushing GLX buffers for drawable %lu (window: %lu), frame sync: %s", g_message ("Flushing GLX buffers for drawable %lu (window: %lu), frame sync: %s",
(unsigned long) drawable, (unsigned long) drawable,
(unsigned long) gdk_x11_window_get_xid (window), (unsigned long) gdk_x11_window_get_xid (window),
@ -398,7 +398,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
if (glx_pixmap == NULL) if (glx_pixmap == NULL)
return FALSE; return FALSE;
GDK_NOTE (OPENGL, g_message ("Using GLX_EXT_texture_from_pixmap to draw surface")); GDK_DISPLAY_NOTE (GDK_DISPLAY (display_x11), OPENGL, g_message ("Using GLX_EXT_texture_from_pixmap to draw surface"));
window = gdk_gl_context_get_window (paint_context)->impl_window; window = gdk_gl_context_get_window (paint_context)->impl_window;
window_scale = gdk_window_get_scale_factor (window); window_scale = gdk_window_get_scale_factor (window);
@ -582,9 +582,9 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
compat_bit = gdk_gl_context_get_forward_compatible (context); compat_bit = gdk_gl_context_get_forward_compatible (context);
/* If there is no glXCreateContextAttribsARB() then we default to legacy */ /* If there is no glXCreateContextAttribsARB() then we default to legacy */
legacy_bit = !display_x11->has_glx_create_context || GDK_DEBUG_CHECK (GL_LEGACY); legacy_bit = !display_x11->has_glx_create_context || GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY);
es_bit = (GDK_DEBUG_CHECK (GL_GLES) || (share != NULL && gdk_gl_context_get_use_es (share))) && es_bit = (GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES) || (share != NULL && gdk_gl_context_get_use_es (share))) &&
(display_x11->has_glx_create_context && display_x11->has_glx_create_es2_context); (display_x11->has_glx_create_context && display_x11->has_glx_create_es2_context);
/* We cannot share legacy contexts with core profile ones, so the /* We cannot share legacy contexts with core profile ones, so the
@ -600,7 +600,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
if (compat_bit) if (compat_bit)
flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Creating GLX context (version:%d.%d, debug:%s, forward:%s, legacy:%s, es:%s)", g_message ("Creating GLX context (version:%d.%d, debug:%s, forward:%s, legacy:%s, es:%s)",
major, minor, major, minor,
debug_bit ? "yes" : "no", debug_bit ? "yes" : "no",
@ -614,7 +614,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
*/ */
if (legacy_bit && !GDK_X11_DISPLAY (display)->has_glx_create_context) if (legacy_bit && !GDK_X11_DISPLAY (display)->has_glx_create_context)
{ {
GDK_NOTE (OPENGL, g_message ("Creating legacy GL context on request")); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Creating legacy GL context on request"));
context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share); context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share);
} }
else else
@ -637,7 +637,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
minor = 0; minor = 0;
} }
GDK_NOTE (OPENGL, g_message ("Creating GL3 context")); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Creating GL3 context"));
context_x11->glx_context = create_gl3_context (display, context_x11->glx_context = create_gl3_context (display,
context_x11->glx_config, context_x11->glx_config,
share, share,
@ -646,7 +646,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
/* Fall back to legacy in case the GL3 context creation failed */ /* Fall back to legacy in case the GL3 context creation failed */
if (context_x11->glx_context == NULL) if (context_x11->glx_context == NULL)
{ {
GDK_NOTE (OPENGL, g_message ("Creating fallback legacy context")); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Creating fallback legacy context"));
context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share); context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share);
legacy_bit = TRUE; legacy_bit = TRUE;
es_bit = FALSE; es_bit = FALSE;
@ -727,7 +727,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
context_x11->is_direct = glXIsDirect (dpy, context_x11->glx_context); context_x11->is_direct = glXIsDirect (dpy, context_x11->glx_context);
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Realized GLX context[%p], %s", g_message ("Realized GLX context[%p], %s",
context_x11->glx_context, context_x11->glx_context,
context_x11->is_direct ? "direct" : "indirect")); context_x11->is_direct ? "direct" : "indirect"));
@ -749,7 +749,7 @@ gdk_x11_gl_context_dispose (GObject *gobject)
if (glXGetCurrentContext () == context_x11->glx_context) if (glXGetCurrentContext () == context_x11->glx_context)
glXMakeContextCurrent (dpy, None, None, NULL); glXMakeContextCurrent (dpy, None, None, NULL);
GDK_NOTE (OPENGL, g_message ("Destroying GLX context")); GDK_DISPLAY_NOTE (display, OPENGL, g_message ("Destroying GLX context"));
glXDestroyContext (dpy, context_x11->glx_context); glXDestroyContext (dpy, context_x11->glx_context);
context_x11->glx_context = NULL; context_x11->glx_context = NULL;
} }
@ -791,7 +791,7 @@ gdk_x11_screen_init_gl (GdkX11Screen *screen)
if (display_x11->have_glx) if (display_x11->have_glx)
return TRUE; return TRUE;
if (GDK_DEBUG_CHECK (GL_DISABLE)) if (GDK_DISPLAY_DEBUG_CHECK (display, GL_DISABLE))
return FALSE; return FALSE;
dpy = gdk_x11_display_get_xdisplay (display); dpy = gdk_x11_display_get_xdisplay (display);
@ -829,7 +829,7 @@ gdk_x11_screen_init_gl (GdkX11Screen *screen)
display_x11->has_glx_visual_rating = display_x11->has_glx_visual_rating =
epoxy_has_glx_extension (dpy, screen_num, "GLX_EXT_visual_rating"); epoxy_has_glx_extension (dpy, screen_num, "GLX_EXT_visual_rating");
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("GLX version %d.%d found\n" g_message ("GLX version %d.%d found\n"
" - Vendor: %s\n" " - Vendor: %s\n"
" - Checked extensions:\n" " - Checked extensions:\n"
@ -1254,14 +1254,14 @@ gdk_x11_display_make_gl_context_current (GdkDisplay *display,
else else
drawable = context_x11->unattached_drawable; drawable = context_x11->unattached_drawable;
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Making GLX context %p current to drawable %lu", g_message ("Making GLX context %p current to drawable %lu",
context, (unsigned long) drawable)); context, (unsigned long) drawable));
if (!glXMakeContextCurrent (dpy, drawable, drawable, if (!glXMakeContextCurrent (dpy, drawable, drawable,
context_x11->glx_context)) context_x11->glx_context))
{ {
GDK_NOTE (OPENGL, GDK_DISPLAY_NOTE (display, OPENGL,
g_message ("Making GLX context current failed")); g_message ("Making GLX context current failed"));
return FALSE; return FALSE;
} }

View File

@ -135,7 +135,7 @@ gdk_x11_selection_input_stream_flush (GdkX11SelectionInputStream *stream)
return; return;
written = gdk_x11_selection_input_stream_fill_buffer (stream, priv->pending_data, priv->pending_size); written = gdk_x11_selection_input_stream_fill_buffer (stream, priv->pending_data, priv->pending_size);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: finishing read of %zd/%zu bytes\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: finishing read of %zd/%zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
written, priv->pending_size)); written, priv->pending_size));
g_task_return_int (priv->pending_task, written); g_task_return_int (priv->pending_task, written);
@ -153,7 +153,7 @@ gdk_x11_selection_input_stream_complete (GdkX11SelectionInputStream *stream)
if (priv->complete) if (priv->complete)
return; return;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: transfer complete\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: transfer complete\n",
priv->selection, priv->target)); priv->selection, priv->target));
priv->complete = TRUE; priv->complete = TRUE;
@ -181,11 +181,11 @@ gdk_x11_selection_input_stream_read (GInputStream *input_stream,
#endif #endif
gssize written; gssize written;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: starting sync read of %zu bytes\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: starting sync read of %zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
count)); count));
written = gdk_x11_selection_input_stream_fill_buffer (stream, buffer, count); written = gdk_x11_selection_input_stream_fill_buffer (stream, buffer, count);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: finishing sync read of %zd/%zu bytes\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: finishing sync read of %zd/%zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
written, count)); written, count));
return written; return written;
@ -221,7 +221,7 @@ gdk_x11_selection_input_stream_read_async (GInputStream *input_stream,
gssize size; gssize size;
size = gdk_x11_selection_input_stream_fill_buffer (stream, buffer, count); size = gdk_x11_selection_input_stream_fill_buffer (stream, buffer, count);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: async read of %zd/%zu bytes\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: async read of %zd/%zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
size, count)); size, count));
g_task_return_int (task, size); g_task_return_int (task, size);
@ -231,7 +231,7 @@ gdk_x11_selection_input_stream_read_async (GInputStream *input_stream,
priv->pending_data = buffer; priv->pending_data = buffer;
priv->pending_size = count; priv->pending_size = count;
priv->pending_task = task; priv->pending_task = task;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: async read of %zu bytes pending\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: async read of %zu bytes pending\n",
priv->selection, priv->target, priv->selection, priv->target,
count)); count));
} }
@ -409,21 +409,21 @@ gdk_x11_selection_input_stream_xevent (GdkDisplay *display,
bytes = get_selection_property (xdisplay, xwindow, xevent->xproperty.atom, &type, &format); bytes = get_selection_property (xdisplay, xwindow, xevent->xproperty.atom, &type, &format);
if (bytes == NULL) if (bytes == NULL)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: got PropertyNotify erroring out of INCR\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: got PropertyNotify erroring out of INCR\n",
priv->selection, priv->target)); priv->selection, priv->target));
/* error, should we signal one? */ /* error, should we signal one? */
gdk_x11_selection_input_stream_complete (stream); gdk_x11_selection_input_stream_complete (stream);
} }
else if (g_bytes_get_size (bytes) == 0 || type == None) else if (g_bytes_get_size (bytes) == 0 || type == None)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: got PropertyNotify ending INCR\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: got PropertyNotify ending INCR\n",
priv->selection, priv->target)); priv->selection, priv->target));
g_bytes_unref (bytes); g_bytes_unref (bytes);
gdk_x11_selection_input_stream_complete (stream); gdk_x11_selection_input_stream_complete (stream);
} }
else else
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: got PropertyNotify during INCR with %zu bytes\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: got PropertyNotify during INCR with %zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
g_bytes_get_size (bytes))); g_bytes_get_size (bytes)));
g_async_queue_push (priv->chunks, bytes); g_async_queue_push (priv->chunks, bytes);
@ -448,7 +448,7 @@ gdk_x11_selection_input_stream_xevent (GdkDisplay *display,
g_task_get_source_tag (priv->pending_task) != gdk_x11_selection_input_stream_new_async) g_task_get_source_tag (priv->pending_task) != gdk_x11_selection_input_stream_new_async)
return FALSE; return FALSE;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: got SelectionNotify\n", priv->selection, priv->target)); GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: got SelectionNotify\n", priv->selection, priv->target));
task = priv->pending_task; task = priv->pending_task;
priv->pending_task = NULL; priv->pending_task = NULL;
@ -478,13 +478,13 @@ gdk_x11_selection_input_stream_xevent (GdkDisplay *display,
{ {
/* The remainder of the selection will come through PropertyNotify /* The remainder of the selection will come through PropertyNotify
events on xwindow */ events on xwindow */
GDK_NOTE(SELECTION, g_printerr ("%s:%s: initiating INCR transfer\n", priv->selection, priv->target)); GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: initiating INCR transfer\n", priv->selection, priv->target));
priv->incr = TRUE; priv->incr = TRUE;
gdk_x11_selection_input_stream_flush (stream); gdk_x11_selection_input_stream_flush (stream);
} }
else else
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: reading %zu bytes\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: reading %zu bytes\n",
priv->selection, priv->target, priv->selection, priv->target,
g_bytes_get_size (bytes))); g_bytes_get_size (bytes)));
g_async_queue_push (priv->chunks, bytes); g_async_queue_push (priv->chunks, bytes);

View File

@ -111,14 +111,14 @@ gdk_x11_pending_selection_notify_send (GdkX11PendingSelectionNotify *notify,
notify->n_pending--; notify->n_pending--;
if (notify->n_pending) if (notify->n_pending)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: not sending SelectionNotify yet, %zu streams still pending\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: not sending SelectionNotify yet, %zu streams still pending\n",
gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection), gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection),
gdk_x11_get_xatom_name_for_display (display, notify->xevent.target), gdk_x11_get_xatom_name_for_display (display, notify->xevent.target),
notify->n_pending)); notify->n_pending));
return; return;
} }
GDK_NOTE(SELECTION, g_printerr ("%s:%s: sending SelectionNotify reporting %s\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: sending SelectionNotify reporting %s\n",
gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection), gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection),
gdk_x11_get_xatom_name_for_display (display, notify->xevent.target), gdk_x11_get_xatom_name_for_display (display, notify->xevent.target),
success ? "success" : "failure")); success ? "success" : "failure"));
@ -131,7 +131,7 @@ gdk_x11_pending_selection_notify_send (GdkX11PendingSelectionNotify *notify,
if (XSendEvent (xdisplay, notify->xevent.requestor, False, NoEventMask, (XEvent*) &notify->xevent) == 0) if (XSendEvent (xdisplay, notify->xevent.requestor, False, NoEventMask, (XEvent*) &notify->xevent) == 0)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: failed to XSendEvent()\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: failed to XSendEvent()\n",
gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection), gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection),
gdk_x11_get_xatom_name_for_display (display, notify->xevent.target))); gdk_x11_get_xatom_name_for_display (display, notify->xevent.target)));
} }
@ -140,7 +140,7 @@ gdk_x11_pending_selection_notify_send (GdkX11PendingSelectionNotify *notify,
error = gdk_x11_display_error_trap_pop (display); error = gdk_x11_display_error_trap_pop (display);
if (error != Success) if (error != Success)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: X error during write: %d\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: X error during write: %d\n",
gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection), gdk_x11_get_xatom_name_for_display (display, notify->xevent.selection),
gdk_x11_get_xatom_name_for_display (display, notify->xevent.target), gdk_x11_get_xatom_name_for_display (display, notify->xevent.target),
error)); error));
@ -241,7 +241,7 @@ gdk_x11_selection_output_stream_perform_flush (GdkX11SelectionOutputStream *stre
XWindowAttributes attrs; XWindowAttributes attrs;
priv->incr = TRUE; priv->incr = TRUE;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: initiating INCR transfer\n", GDK_DISPLAY_NOTE (priv->display, SELECTION, g_printerr ("%s:%s: initiating INCR transfer\n",
priv->selection, priv->target)); priv->selection, priv->target));
XGetWindowAttributes (xdisplay, XGetWindowAttributes (xdisplay,
@ -271,7 +271,7 @@ gdk_x11_selection_output_stream_perform_flush (GdkX11SelectionOutputStream *stre
PropModeReplace, PropModeReplace,
priv->data->data, priv->data->data,
n_elements); n_elements);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: wrote %zu/%u bytes\n", GDK_DISPLAY_NOTE (priv->display, SELECTION, g_printerr ("%s:%s: wrote %zu/%u bytes\n",
priv->selection, priv->target, n_elements * element_size, priv->data->len)); priv->selection, priv->target, n_elements * element_size, priv->data->len));
g_byte_array_remove_range (priv->data, 0, n_elements * element_size); g_byte_array_remove_range (priv->data, 0, n_elements * element_size);
if (priv->data->len < element_size) if (priv->data->len < element_size)
@ -292,7 +292,7 @@ gdk_x11_selection_output_stream_perform_flush (GdkX11SelectionOutputStream *stre
error = gdk_x11_display_error_trap_pop (priv->display); error = gdk_x11_display_error_trap_pop (priv->display);
if (error != Success) if (error != Success)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s:%s: X error during write: %d\n", GDK_DISPLAY_NOTE (priv->display, SELECTION, g_printerr ("%s:%s: X error during write: %d\n",
priv->selection, priv->target, error)); priv->selection, priv->target, error));
} }
@ -328,7 +328,7 @@ gdk_x11_selection_output_stream_write (GOutputStream *output_stream,
g_mutex_lock (&priv->mutex); g_mutex_lock (&priv->mutex);
g_byte_array_append (priv->data, buffer, count); g_byte_array_append (priv->data, buffer, count);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: wrote %zu bytes, %u total now\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: wrote %zu bytes, %u total now\n",
priv->selection, priv->target, count, priv->data->len)); priv->selection, priv->target, count, priv->data->len));
g_mutex_unlock (&priv->mutex); g_mutex_unlock (&priv->mutex);
@ -361,7 +361,7 @@ gdk_x11_selection_output_stream_write_async (GOutputStream *output_stream
g_mutex_lock (&priv->mutex); g_mutex_lock (&priv->mutex);
g_byte_array_append (priv->data, buffer, count); g_byte_array_append (priv->data, buffer, count);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: async wrote %zu bytes, %u total now\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: async wrote %zu bytes, %u total now\n",
priv->selection, priv->target, count, priv->data->len)); priv->selection, priv->target, count, priv->data->len));
g_mutex_unlock (&priv->mutex); g_mutex_unlock (&priv->mutex);
@ -412,8 +412,8 @@ gdk_x11_selection_output_request_flush (GdkX11SelectionOutputStream *stream)
needs_flush = gdk_x11_selection_output_stream_needs_flush_unlocked (stream); needs_flush = gdk_x11_selection_output_stream_needs_flush_unlocked (stream);
g_mutex_unlock (&priv->mutex); g_mutex_unlock (&priv->mutex);
GDK_NOTE(SELECTION, g_printerr ("%s:%s: requested flush%s\n", GDK_NOTE (SELECTION, g_printerr ("%s:%s: requested flush%s\n",
priv->selection, priv->target, needs_flush ? "" : ", but not needed")); priv->selection, priv->target, needs_flush ?"" : ", but not needed"));
return needs_flush; return needs_flush;
} }
@ -612,7 +612,7 @@ gdk_x11_selection_output_stream_xevent (GdkDisplay *display,
xevent->xproperty.state != PropertyDelete) xevent->xproperty.state != PropertyDelete)
return FALSE; return FALSE;
GDK_NOTE(SELECTION, g_printerr ("%s:%s: got PropertyNotify Delete during INCR\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s:%s: got PropertyNotify Delete during INCR\n",
priv->selection, priv->target)); priv->selection, priv->target));
priv->delete_pending = FALSE; priv->delete_pending = FALSE;
if (gdk_x11_selection_output_stream_needs_flush (stream) && if (gdk_x11_selection_output_stream_needs_flush (stream) &&
@ -672,7 +672,7 @@ print_atoms (GdkDisplay *display,
const Atom *atoms, const Atom *atoms,
gsize n_atoms) gsize n_atoms)
{ {
GDK_NOTE(CLIPBOARD, GDK_DISPLAY_NOTE (display, CLIPBOARD,
gsize i; gsize i;
g_printerr ("%s: %s [ ", selection, prefix); g_printerr ("%s: %s [ ", selection, prefix);
@ -694,7 +694,7 @@ handle_targets_done (GObject *stream,
if (!g_output_stream_write_all_finish (G_OUTPUT_STREAM (stream), result, &bytes_written, &error)) if (!g_output_stream_write_all_finish (G_OUTPUT_STREAM (stream), result, &bytes_written, &error))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("---: failed to send targets after %zu bytes: %s\n", GDK_NOTE (CLIPBOARD, g_printerr ("---: failed to send targets after %zu bytes: %s\n",
bytes_written, error->message)); bytes_written, error->message));
g_error_free (error); g_error_free (error);
} }
@ -741,7 +741,7 @@ handle_timestamp_done (GObject *stream,
if (!g_output_stream_write_all_finish (G_OUTPUT_STREAM (stream), result, &bytes_written, &error)) if (!g_output_stream_write_all_finish (G_OUTPUT_STREAM (stream), result, &bytes_written, &error))
{ {
GDK_NOTE(CLIPBOARD, g_printerr ("---: failed to send timestamp after %zu bytes: %s\n", GDK_NOTE (CLIPBOARD, g_printerr ("---: failed to send timestamp after %zu bytes: %s\n",
bytes_written, error->message)); bytes_written, error->message));
g_error_free (error); g_error_free (error);
} }
@ -905,13 +905,13 @@ gdk_x11_selection_output_streams_request (GdkDisplay *display,
&n_atoms, &nbytes, (guchar **) &atoms); &n_atoms, &nbytes, (guchar **) &atoms);
if (error != Success) if (error != Success)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s: XGetProperty() during MULTIPLE failed with %d\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s: XGetProperty() during MULTIPLE failed with %d\n",
selection, error)); selection, error));
} }
else if (prop_format != 32 || else if (prop_format != 32 ||
prop_type != gdk_x11_get_xatom_by_name_for_display (display, "ATOM_PAIR")) prop_type != gdk_x11_get_xatom_by_name_for_display (display, "ATOM_PAIR"))
{ {
GDK_NOTE(SELECTION, g_printerr ("%s: XGetProperty() type/format should be ATOM_PAIR/32 but is %s/%d\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s: XGetProperty() type/format should be ATOM_PAIR/32 but is %s/%d\n",
selection, gdk_x11_get_xatom_name_for_display (display, prop_type), prop_format)); selection, gdk_x11_get_xatom_name_for_display (display, prop_type), prop_format));
} }
else if (n_atoms < 2) else if (n_atoms < 2)
@ -925,7 +925,7 @@ gdk_x11_selection_output_streams_request (GdkDisplay *display,
print_atoms (display, selection, "MULTIPLE request", atoms, n_atoms); print_atoms (display, selection, "MULTIPLE request", atoms, n_atoms);
if (n_atoms % 2) if (n_atoms % 2)
{ {
GDK_NOTE(SELECTION, g_printerr ("%s: Number of atoms is uneven at %lu, ignoring last element\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s: Number of atoms is uneven at %lu, ignoring last element\n",
selection, n_atoms)); selection, n_atoms));
n_atoms &= ~1; n_atoms &= ~1;
} }
@ -939,14 +939,14 @@ gdk_x11_selection_output_streams_request (GdkDisplay *display,
if (atoms[2 * i] == None || atoms[2 * i + 1] == None) if (atoms[2 * i] == None || atoms[2 * i + 1] == None)
{ {
success = FALSE; success = FALSE;
GDK_NOTE(SELECTION, g_printerr ("%s: None not allowed as atom in MULTIPLE request\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s: None not allowed as atom in MULTIPLE request\n",
selection)); selection));
gdk_x11_pending_selection_notify_send (notify, display, FALSE); gdk_x11_pending_selection_notify_send (notify, display, FALSE);
} }
else if (atoms[2 * i] == gdk_x11_get_xatom_by_name_for_display (display, "MULTIPLE")) else if (atoms[2 * i] == gdk_x11_get_xatom_by_name_for_display (display, "MULTIPLE"))
{ {
success = FALSE; success = FALSE;
GDK_NOTE(SELECTION, g_printerr ("%s: MULTIPLE as target in MULTIPLE request would cause recursion\n", GDK_DISPLAY_NOTE (display, SELECTION, g_printerr ("%s: MULTIPLE as target in MULTIPLE request would cause recursion\n",
selection)); selection));
gdk_x11_pending_selection_notify_send (notify, display, FALSE); gdk_x11_pending_selection_notify_send (notify, display, FALSE);
} }

View File

@ -196,7 +196,7 @@ _gdk_x11_screen_init_visuals (GdkX11Screen *x11_screen,
} }
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (GDK_DEBUG_CHECK (MISC)) if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), MISC))
{ {
static const gchar *const visual_names[] = static const gchar *const visual_names[] =
{ {

View File

@ -410,8 +410,7 @@ gdk_x11_window_end_frame (GdkWindow *window)
if (impl->toplevel->current_counter_value % 2 == 1) if (impl->toplevel->current_counter_value % 2 == 1)
{ {
#ifdef G_ENABLE_DEBUG if (GDK_DISPLAY_DEBUG_CHECK (gdk_window_get_display (window), FRAMES))
if (GDK_DEBUG_CHECK (FRAMES))
{ {
XImage *image = XGetImage (GDK_WINDOW_XDISPLAY (window), XImage *image = XGetImage (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), GDK_WINDOW_XID (window),
@ -420,7 +419,6 @@ gdk_x11_window_end_frame (GdkWindow *window)
ZPixmap); ZPixmap);
XDestroyImage (image); XDestroyImage (image);
} }
#endif /* G_ENABLE_DEBUG */
/* An increment of 3 means that the frame was not drawn as fast as possible, /* An increment of 3 means that the frame was not drawn as fast as possible,
* but rather at a particular time. This can trigger different handling from * but rather at a particular time. This can trigger different handling from

View File

@ -272,7 +272,7 @@ parse_settings (unsigned char *data,
!fetch_card32 (&buffer, &n_entries)) !fetch_card32 (&buffer, &n_entries))
goto out; goto out;
GDK_NOTE(SETTINGS, g_message ("reading %u settings (serial %u byte order %u)", n_entries, serial, buffer.byte_order)); GDK_NOTE (SETTINGS, g_message ("reading %u settings (serial %u byte order %u)", n_entries, serial, buffer.byte_order));
for (i = 0; i < n_entries; i++) for (i = 0; i < n_entries; i++)
{ {
@ -303,7 +303,7 @@ parse_settings (unsigned char *data,
g_value_init (value, G_TYPE_INT); g_value_init (value, G_TYPE_INT);
g_value_set_int (value, (gint32) v_int); g_value_set_int (value, (gint32) v_int);
GDK_NOTE(SETTINGS, g_message (" %s = %d", x_name, (gint32) v_int)); GDK_NOTE (SETTINGS, g_message (" %s = %d", x_name, (gint32) v_int));
break; break;
case XSETTINGS_TYPE_STRING: case XSETTINGS_TYPE_STRING:
{ {
@ -317,7 +317,7 @@ parse_settings (unsigned char *data,
g_value_init (value, G_TYPE_STRING); g_value_init (value, G_TYPE_STRING);
g_value_take_string (value, s); g_value_take_string (value, s);
GDK_NOTE(SETTINGS, g_message (" %s = \"%s\"", x_name, s)); GDK_NOTE (SETTINGS, g_message (" %s = \"%s\"", x_name, s));
} }
break; break;
case XSETTINGS_TYPE_COLOR: case XSETTINGS_TYPE_COLOR:
@ -340,12 +340,12 @@ parse_settings (unsigned char *data,
g_value_init (value, G_TYPE_STRING); g_value_init (value, G_TYPE_STRING);
g_value_set_boxed (value, &rgba); g_value_set_boxed (value, &rgba);
GDK_NOTE(SETTINGS, g_message (" %s = #%02X%02X%02X%02X", x_name, alpha,red, green, blue)); GDK_NOTE (SETTINGS, g_message (" %s = #%02X%02X%02X%02X", x_name, alpha,red, green, blue));
} }
break; break;
default: default:
/* Quietly ignore unknown types */ /* Quietly ignore unknown types */
GDK_NOTE(SETTINGS, g_message (" %s = ignored (unknown type %u)", x_name, type)); GDK_NOTE (SETTINGS, g_message (" %s = ignored (unknown type %u)", x_name, type));
break; break;
} }
@ -355,12 +355,12 @@ parse_settings (unsigned char *data,
if (gdk_name == NULL) if (gdk_name == NULL)
{ {
GDK_NOTE(SETTINGS, g_message (" ==> unknown to GTK")); GDK_NOTE (SETTINGS, g_message (" ==> unknown to GTK"));
free_value (value); free_value (value);
} }
else else
{ {
GDK_NOTE(SETTINGS, g_message (" ==> storing as '%s'", gdk_name)); GDK_NOTE (SETTINGS, g_message (" ==> storing as '%s'", gdk_name));
if (settings == NULL) if (settings == NULL)
settings = g_hash_table_new_full (g_str_hash, g_str_equal, settings = g_hash_table_new_full (g_str_hash, g_str_equal,

View File

@ -51,6 +51,8 @@
#include "gtkmodulesprivate.h" #include "gtkmodulesprivate.h"
#include "gtkwindow.h" #include "gtkwindow.h"
#include "gtkwindowgroup.h" #include "gtkwindowgroup.h"
#include "gtkprivate.h"
#include "gdk-private.h"
G_DEFINE_TYPE (GtkInspectorWindow, gtk_inspector_window, GTK_TYPE_WINDOW) G_DEFINE_TYPE (GtkInspectorWindow, gtk_inspector_window, GTK_TYPE_WINDOW)
@ -321,6 +323,9 @@ get_inspector_display (void)
g_object_set_data_full (G_OBJECT (display), "gsk-renderer", g_object_set_data_full (G_OBJECT (display), "gsk-renderer",
g_strdup (name), g_free); g_strdup (name), g_free);
gdk_display_set_debug_flags (display, 0);
gtk_set_display_debug_flags (display, 0);
} }
if (!display) if (!display)