Commit 0dcaad3a authored by Matthias Clasen's avatar Matthias Clasen

Drop the gdk_display variable from gdk

This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
parent 001d16cb
......@@ -1006,7 +1006,6 @@ gdk_drag_context_get_type
<TITLE>X Window System Interaction</TITLE>
<FILE>x_interaction</FILE>
GDK_ROOT_WINDOW
GDK_DISPLAY
GDK_WINDOW_XDISPLAY
GDK_WINDOW_XID
GDK_PIXMAP_XDISPLAY
......@@ -1077,7 +1076,6 @@ gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
<SUBSECTION Private>
gdk_display
GDK_HAVE_WCHAR_H
GDK_HAVE_WCTYPE_H
gdk_x11_pixmap_get_drawable_impl
......
......@@ -1091,9 +1091,3 @@ gdk_app_launch_context_set_icon_name
gdk_window_impl_get_type G_GNUC_CONST
#endif
#endif
#ifdef GDK_WINDOWING_X11
#ifdef INCLUDE_VARIABLES
gdk_display
#endif
#endif
......@@ -1968,12 +1968,7 @@ _gdk_windowing_set_default_display (GdkDisplay *display)
const gchar *startup_id;
if (!display)
{
gdk_display = NULL;
return;
}
gdk_display = GDK_DISPLAY_XDISPLAY (display);
return;
g_free (display_x11->startup_notification_id);
display_x11->startup_notification_id = NULL;
......
......@@ -32,6 +32,5 @@
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
Display *gdk_display = NULL;
GdkAtom _gdk_selection_property;
gboolean _gdk_synchronize = FALSE;
......@@ -34,10 +34,6 @@
G_BEGIN_DECLS
#ifndef GDK_MULTIHEAD_SAFE
extern Display *gdk_display;
#endif
Display *gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable);
XID gdk_x11_drawable_get_xid (GdkDrawable *drawable);
GdkDrawable *gdk_x11_window_get_drawable_impl (GdkWindow *window);
......@@ -67,10 +63,6 @@ gint gdk_x11_get_default_screen (void);
#define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor))
#define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor))
#ifndef GDK_MULTIHEAD_SAFE
#define GDK_DISPLAY() gdk_display
#endif
#ifdef GDK_COMPILATION
#include "gdkprivate-x11.h"
......
......@@ -664,10 +664,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,
......@@ -718,11 +718,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,
......@@ -919,11 +919,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment