Commit d5803fa9 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Get rid of the _gdk_selection_property global

parent 185cdddb
...@@ -154,7 +154,8 @@ static const char *const precache_atoms[] = { ...@@ -154,7 +154,8 @@ static const char *const precache_atoms[] = {
"_NET_WM_WINDOW_TYPE", "_NET_WM_WINDOW_TYPE",
"_NET_WM_WINDOW_TYPE_NORMAL", "_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_USER_TIME", "_NET_WM_USER_TIME",
"_NET_VIRTUAL_ROOTS" "_NET_VIRTUAL_ROOTS",
"GDK_SELECTION"
}; };
static char *gdk_sm_client_id; static char *gdk_sm_client_id;
...@@ -2153,8 +2154,8 @@ gdk_x11_display_store_clipboard (GdkDisplay *display, ...@@ -2153,8 +2154,8 @@ gdk_x11_display_store_clipboard (GdkDisplay *display,
int i; int i;
if (n_targets > 0) if (n_targets > 0)
{ {
property_name = gdk_x11_atom_to_xatom_for_display (display, _gdk_selection_property); property_name = gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION");
xatoms = g_new (Atom, n_targets); xatoms = g_new (Atom, n_targets);
for (i = 0; i < n_targets; i++) for (i = 0; i < n_targets; i++)
......
...@@ -33,5 +33,4 @@ ...@@ -33,5 +33,4 @@
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */ gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
GdkAtom _gdk_selection_property;
gboolean _gdk_synchronize = FALSE; gboolean _gdk_synchronize = FALSE;
...@@ -102,8 +102,6 @@ _gdk_x11_windowing_init (void) ...@@ -102,8 +102,6 @@ _gdk_x11_windowing_init (void)
g_queue_init (&gdk_error_traps); g_queue_init (&gdk_error_traps);
XSetErrorHandler (gdk_x_error); XSetErrorHandler (gdk_x_error);
XSetIOErrorHandler (gdk_x_io_error); XSetIOErrorHandler (gdk_x_io_error);
_gdk_selection_property = gdk_atom_intern_static_string ("GDK_SELECTION");
} }
GdkGrabStatus GdkGrabStatus
......
...@@ -241,10 +241,10 @@ gdk_selection_convert (GdkWindow *requestor, ...@@ -241,10 +241,10 @@ gdk_selection_convert (GdkWindow *requestor,
display = GDK_WINDOW_DISPLAY (requestor); display = GDK_WINDOW_DISPLAY (requestor);
XConvertSelection (GDK_WINDOW_XDISPLAY (requestor), XConvertSelection (GDK_WINDOW_XDISPLAY (requestor),
gdk_x11_atom_to_xatom_for_display (display, selection), gdk_x11_atom_to_xatom_for_display (display, selection),
gdk_x11_atom_to_xatom_for_display (display, target), gdk_x11_atom_to_xatom_for_display (display, target),
gdk_x11_atom_to_xatom_for_display (display, _gdk_selection_property), gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION"),
GDK_WINDOW_XID (requestor), time); GDK_WINDOW_XID (requestor), time);
} }
/** /**
...@@ -297,11 +297,11 @@ gdk_selection_property_get (GdkWindow *requestor, ...@@ -297,11 +297,11 @@ gdk_selection_property_get (GdkWindow *requestor,
notified of PropertyChange events _before_ the property is deleted. notified of PropertyChange events _before_ the property is deleted.
Otherwise there's no guarantee we'll win the race ... */ Otherwise there's no guarantee we'll win the race ... */
if (XGetWindowProperty (GDK_WINDOW_XDISPLAY (requestor), if (XGetWindowProperty (GDK_WINDOW_XDISPLAY (requestor),
GDK_WINDOW_XID (requestor), GDK_WINDOW_XID (requestor),
gdk_x11_atom_to_xatom_for_display (display, _gdk_selection_property), gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION"),
0, 0x1FFFFFFF /* MAXINT32 / 4 */, False, 0, 0x1FFFFFFF /* MAXINT32 / 4 */, False,
AnyPropertyType, &prop_type, &prop_format, AnyPropertyType, &prop_type, &prop_format,
&nitems, &nbytes, &t) != Success) &nitems, &nbytes, &t) != Success)
goto err; goto err;
if (prop_type != None) if (prop_type != None)
......
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