diff --git a/docs/reference/gdk/tmpl/x_interaction.sgml b/docs/reference/gdk/tmpl/x_interaction.sgml index 66a5a07172..ffc0a97cbd 100644 --- a/docs/reference/gdk/tmpl/x_interaction.sgml +++ b/docs/reference/gdk/tmpl/x_interaction.sgml @@ -41,6 +41,8 @@ The current display. @Returns: an Xlib Display*. +@Deprecated: 2.22: Use gdk_display_get_default () + diff --git a/docs/tools/shooter.c b/docs/tools/shooter.c index 95555ecd10..98666a0c38 100644 --- a/docs/tools/shooter.c +++ b/docs/tools/shooter.c @@ -33,7 +33,7 @@ find_toplevel_window (Window xid) do { - if (XQueryTree (GDK_DISPLAY (), xid, &root, + if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root, &parent, &children, &nchildren) == 0) { g_warning ("Couldn't find window manager window"); @@ -82,7 +82,7 @@ remove_shaped_area (GdkPixbuf *pixbuf, gdk_pixbuf_get_height (pixbuf)); gdk_pixbuf_fill (retval, 0); - rectangles = XShapeGetRectangles (GDK_DISPLAY (), window, + rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, ShapeBounding, &rectangle_count, &rectangle_order); for (i = 0; i < rectangle_count; i++) @@ -130,7 +130,7 @@ take_window_shot (Window child, GdkPixbuf *tmp, *tmp2; GdkPixbuf *retval; - disp = GDK_DISPLAY (); + disp = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); w = GDK_ROOT_WINDOW (); if (include_decoration) diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 226db88d44..6469d45dd8 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -21,7 +21,7 @@ find_toplevel_window (Window xid) do { - if (XQueryTree (GDK_DISPLAY (), xid, &root, + if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root, &parent, &children, &nchildren) == 0) { g_warning ("Couldn't find window manager window"); diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h index 9bc577ae00..836889089e 100644 --- a/gdk/x11/gdkx.h +++ b/gdk/x11/gdkx.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS -#ifndef GDK_MULTIHEAD_SAFE +#if !defined (GDK_DISABLE_DEPRECATED) && !defined (GDK_MULTIHEAD_SAFE) && defined (GDK_COMPILATION) extern Display *gdk_display; #endif @@ -75,7 +75,7 @@ gint gdk_x11_get_default_screen (void); #define GDK_IMAGE_XDISPLAY(image) (gdk_x11_image_get_xdisplay (image)) #define GDK_IMAGE_XIMAGE(image) (gdk_x11_image_get_ximage (image)) -#ifndef GDK_MULTIHEAD_SAFE +#if !defined (GDK_DISABLE_DEPRECATED) && !defined (GDK_MULTIHEAD_SAFE) && defined (GDK_COMPILATION) #define GDK_DISPLAY() gdk_display #endif diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c index 5582b3a541..4ae51ada04 100644 --- a/modules/other/gail/gailwindow.c +++ b/modules/other/gail/gailwindow.c @@ -662,10 +662,10 @@ get_window_desktop (Window window) if (_net_wm_desktop == None) _net_wm_desktop = - XInternAtom (gdk_display, "_NET_WM_DESKTOP", False); + XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "_NET_WM_DESKTOP", False); gdk_error_trap_push (); - result = XGetWindowProperty (gdk_display, window, _net_wm_desktop, + result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, _net_wm_desktop, 0, G_MAXLONG, False, XA_CARDINAL, &ret_type, &format, &nitems, @@ -716,11 +716,11 @@ get_stacked_windows (GailScreenInfo *info) if (_net_client_list_stacking == None) _net_client_list_stacking = - XInternAtom (gdk_display, "_NET_CLIENT_LIST_STACKING", False); + XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "_NET_CLIENT_LIST_STACKING", False); gdk_error_trap_push (); ret_type = None; - result = XGetWindowProperty (gdk_display, + result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_WINDOW_XWINDOW (info->root_window), _net_client_list_stacking, 0, G_MAXLONG, @@ -917,11 +917,11 @@ init_gail_screen (GdkScreen *screen, get_stacked_windows (&gail_screens [screen_n]); - XGetWindowAttributes (gdk_display, + XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_WINDOW_XWINDOW (gail_screens [screen_n].root_window), &attrs); - XSelectInput (gdk_display, + XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_WINDOW_XWINDOW (gail_screens [screen_n].root_window), attrs.your_event_mask | PropertyChangeMask);