gtk: add a per-display log macro

This makes the conversion easier.
This commit is contained in:
Matthias Clasen 2018-01-14 09:54:45 -05:00
parent c2793de6e2
commit 22e59ecd28

View File

@ -117,10 +117,15 @@ guint gtk_get_display_debug_flags (GdkDisplay *display);
#ifdef G_ENABLE_DEBUG
#define GTK_DISPLAY_DEBUG_CHECK(display,type) G_UNLIKELY (gtk_get_display_debug_flags (display) & GTK_DEBUG_##type)
#define GTK_DISPLAY_NOTE(display,type,action) \
G_STMT_START { \
if (GTK_DISPLAY_DEBUG_CHECK (display,type)) { action; }; \
} G_STMT_END
#else
#define GTK_DISPLAY_DEBUG_CHECK(display,type) 0
#define GTK_DISPLAY_NOTE(display,type,action)
#endif /* G_ENABLE_DEBUG */