[gtk+] Drop the gdk_display variable from gdk
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Drop the gdk_display variable from gdk
- Date: Thu, 9 Sep 2010 23:49:01 +0000 (UTC)
commit 0dcaad3a85137fee646847fed42c2072c2db7890
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Sep 9 19:46:41 2010 -0400
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.
docs/reference/gdk/gdk3-sections.txt | 2 --
gdk/gdk.symbols | 6 ------
gdk/x11/gdkdisplay-x11.c | 7 +------
gdk/x11/gdkglobals-x11.c | 1 -
gdk/x11/gdkx.h | 8 --------
modules/other/gail/gailwindow.c | 12 ++++++------
6 files changed, 7 insertions(+), 29 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index fe5d5de..9bb206f 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -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
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 4480da1..61a87a8 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -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
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 5aeb017..59c7600 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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;
diff --git a/gdk/x11/gdkglobals-x11.c b/gdk/x11/gdkglobals-x11.c
index 8852d3b..de9bbcc 100644
--- a/gdk/x11/gdkglobals-x11.c
+++ b/gdk/x11/gdkglobals-x11.c
@@ -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;
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 0053dae..ec6ddd5 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -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"
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 0f80a7b..3d94041 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]