diff options
author | infirit <[email protected]> | 2015-07-09 10:39:04 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-07-09 11:28:41 +0200 |
commit | 1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50 (patch) | |
tree | d191f95dc10adac55375ed5f15425fda420f3abf /src/gs-window-x11.c | |
parent | c1d1e089a69c5e90e8b0cf4b96335899f209e7f0 (diff) | |
download | mate-screensaver-1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50.tar.bz2 mate-screensaver-1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50.tar.xz |
Always use GDK_DISPLAY_XDISPLAY instead of GDK_DISPLAY
Has been in Gtk since 2.22
Diffstat (limited to 'src/gs-window-x11.c')
-rw-r--r-- | src/gs-window-x11.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c index 3ed8b8e..f9369e8 100644 --- a/src/gs-window-x11.c +++ b/src/gs-window-x11.c @@ -269,7 +269,7 @@ clear_children (Window window) int status; children = NULL; - status = XQueryTree (GDK_DISPLAY (), window, &root, &parent, &children, &n_children); + status = XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, &root, &parent, &children, &n_children); if (status == 0) { @@ -288,7 +288,7 @@ clear_children (Window window) child = children [--n_children]; - XClearWindow (GDK_DISPLAY (), child); + XClearWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), child); clear_children (child); } @@ -1078,18 +1078,10 @@ select_popup_events (void) gdk_error_trap_push (); memset (&attr, 0, sizeof (attr)); -#if GTK_CHECK_VERSION (3, 0, 0) XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), &attr); -#else - XGetWindowAttributes (GDK_DISPLAY (), GDK_ROOT_WINDOW (), &attr); -#endif events = SubstructureNotifyMask | attr.your_event_mask; -#if GTK_CHECK_VERSION (3, 0, 0) XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), events); -#else - XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), events); -#endif gdk_display_sync (gdk_display_get_default ()); gdk_error_trap_pop (); @@ -1104,18 +1096,10 @@ window_select_shape_events (GSWindow *window) gdk_error_trap_push (); -#if GTK_CHECK_VERSION (3, 0, 0) if (XShapeQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &window->priv->shape_event_base, &shape_error_base)) { events = ShapeNotifyMask; XShapeSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))), events); } -#else - if (XShapeQueryExtension (GDK_DISPLAY (), &window->priv->shape_event_base, &shape_error_base)) - { - events = ShapeNotifyMask; - XShapeSelectInput (GDK_DISPLAY (), GDK_WINDOW_XID (GTK_WIDGET (window)->window), events); - } -#endif gdk_display_sync (gdk_display_get_default ()); gdk_error_trap_pop (); |