mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Get rid of the _gdk_selection_property global
This commit is contained in:
parent
185cdddb0d
commit
d5803fa9b2
@ -154,7 +154,8 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_WINDOW_TYPE",
|
||||
"_NET_WM_WINDOW_TYPE_NORMAL",
|
||||
"_NET_WM_USER_TIME",
|
||||
"_NET_VIRTUAL_ROOTS"
|
||||
"_NET_VIRTUAL_ROOTS",
|
||||
"GDK_SELECTION"
|
||||
};
|
||||
|
||||
static char *gdk_sm_client_id;
|
||||
@ -2153,8 +2154,8 @@ gdk_x11_display_store_clipboard (GdkDisplay *display,
|
||||
int i;
|
||||
|
||||
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);
|
||||
for (i = 0; i < n_targets; i++)
|
||||
|
@ -33,5 +33,4 @@
|
||||
|
||||
|
||||
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
|
||||
GdkAtom _gdk_selection_property;
|
||||
gboolean _gdk_synchronize = FALSE;
|
||||
|
@ -102,8 +102,6 @@ _gdk_x11_windowing_init (void)
|
||||
g_queue_init (&gdk_error_traps);
|
||||
XSetErrorHandler (gdk_x_error);
|
||||
XSetIOErrorHandler (gdk_x_io_error);
|
||||
|
||||
_gdk_selection_property = gdk_atom_intern_static_string ("GDK_SELECTION");
|
||||
}
|
||||
|
||||
GdkGrabStatus
|
||||
|
@ -241,10 +241,10 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
display = GDK_WINDOW_DISPLAY (requestor);
|
||||
|
||||
XConvertSelection (GDK_WINDOW_XDISPLAY (requestor),
|
||||
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, _gdk_selection_property),
|
||||
GDK_WINDOW_XID (requestor), time);
|
||||
gdk_x11_atom_to_xatom_for_display (display, selection),
|
||||
gdk_x11_atom_to_xatom_for_display (display, target),
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION"),
|
||||
GDK_WINDOW_XID (requestor), time);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -297,11 +297,11 @@ gdk_selection_property_get (GdkWindow *requestor,
|
||||
notified of PropertyChange events _before_ the property is deleted.
|
||||
Otherwise there's no guarantee we'll win the race ... */
|
||||
if (XGetWindowProperty (GDK_WINDOW_XDISPLAY (requestor),
|
||||
GDK_WINDOW_XID (requestor),
|
||||
gdk_x11_atom_to_xatom_for_display (display, _gdk_selection_property),
|
||||
0, 0x1FFFFFFF /* MAXINT32 / 4 */, False,
|
||||
AnyPropertyType, &prop_type, &prop_format,
|
||||
&nitems, &nbytes, &t) != Success)
|
||||
GDK_WINDOW_XID (requestor),
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION"),
|
||||
0, 0x1FFFFFFF /* MAXINT32 / 4 */, False,
|
||||
AnyPropertyType, &prop_type, &prop_format,
|
||||
&nitems, &nbytes, &t) != Success)
|
||||
goto err;
|
||||
|
||||
if (prop_type != None)
|
||||
|
Loading…
Reference in New Issue
Block a user