summaryrefslogtreecommitdiff
path: root/gdk/x11/xsettings-client.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-01-02 19:07:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-01-02 19:07:03 +0000
commit129ad4b48db80f8c031254ef63dcee6beb552a83 (patch)
treebc4e5d225e18403face6861bb147dd14cd42c8d9 /gdk/x11/xsettings-client.c
parent4bf5344e3d33a497d6bc1644c7da6abd368d9dda (diff)
downloadgtk+-129ad4b48db80f8c031254ef63dcee6beb552a83.tar.gz
Try to fix #315732, reported by Luke Hutchinson:
2007-01-02 Matthias Clasen <mclasen@redhat.com> Try to fix #315732, reported by Luke Hutchinson: * gdk/x11/xsettings-client.[hc]: * gdk/x11/gdkdevents-x11.c: Don't assume that ref'ing a GdkWindow will guarantee that it can be looked up in the xid hash later. Also, use the nesting server grab function during the xsettings client initialization. Finally, make xsettings client not eat DestroyNotifys so that GDK can do its regular cleanup. svn path=/trunk/; revision=17022
Diffstat (limited to 'gdk/x11/xsettings-client.c')
-rw-r--r--gdk/x11/xsettings-client.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index d0ae1ec885..d17e4213a6 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2001 Red Hat, Inc.
+ * Copyright © 2001, 2007 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -455,6 +455,19 @@ xsettings_client_new (Display *display,
XSettingsWatchFunc watch,
void *cb_data)
{
+ return xsettings_client_new_with_grab_funcs (display, screen, notify, watch, cb_data,
+ NULL, NULL);
+}
+
+XSettingsClient *
+xsettings_client_new_with_grab_funcs (Display *display,
+ int screen,
+ XSettingsNotifyFunc notify,
+ XSettingsWatchFunc watch,
+ void *cb_data,
+ XSettingsGrabFunc grab,
+ XSettingsGrabFunc ungrab)
+{
XSettingsClient *client;
char buffer[256];
char *atom_names[3];
@@ -469,8 +482,8 @@ xsettings_client_new (Display *display,
client->notify = notify;
client->watch = watch;
client->cb_data = cb_data;
- client->grab = NULL;
- client->ungrab = NULL;
+ client->grab = grab;
+ client->ungrab = ungrab;
client->manager_window = None;
client->settings = NULL;
@@ -505,6 +518,7 @@ xsettings_client_new (Display *display,
return client;
}
+
void
xsettings_client_set_grab_func (XSettingsClient *client,
XSettingsGrabFunc grab)
@@ -571,7 +585,8 @@ xsettings_client_process_event (XSettingsClient *client,
if (xev->xany.type == DestroyNotify)
{
check_manager_window (client);
- return True;
+ /* let GDK do its cleanup */
+ return False;
}
else if (xev->xany.type == PropertyNotify)
{