[gtk+] x11: Consolidate root window event setting in one place



commit ed38dbe28f81b46fe28400f50dcec1ab0061382c
Author: Benjamin Otte <otte redhat com>
Date:   Fri Feb 15 18:20:18 2013 +0100

    x11: Consolidate root window event setting in one place
    
    No need to duplicate things in xsettings code.

 gdk/x11/gdkscreen-x11.c    |    1 +
 gdk/x11/xsettings-client.c |   15 ---------------
 2 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 4ab66c3..fd37020 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -1095,6 +1095,7 @@ init_randr_support (GdkScreen *screen)
 {
   GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
 
+  /* NB: This is also needed for XSettings, so don't remove. */
   XSelectInput (GDK_SCREEN_XDISPLAY (screen),
                 x11_screen->xroot_window,
                 StructureNotifyMask);
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 1cc3729..bdcf49d 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -397,17 +397,6 @@ read_settings (XSettingsClient *client)
     g_hash_table_unref (old_list);
 }
 
-static void
-add_events (Display *display,
-           Window   window,
-           long     mask)
-{
-  XWindowAttributes attr;
-
-  XGetWindowAttributes (display, window, &attr);
-  XSelectInput (display, window, attr.your_event_mask | mask);
-}
-
 static Bool
 gdk_xsettings_watch (Window     window,
                     Bool       is_start,
@@ -563,10 +552,6 @@ xsettings_client_new (GdkScreen *screen)
   client->xsettings_atom = atoms[1];
   client->manager_atom = atoms[2];
 
-  /* Select on StructureNotify so we get MANAGER events
-   */
-  add_events (client->display, gdk_x11_window_get_xid (gdk_screen_get_root_window (screen)), 
StructureNotifyMask);
-
   gdk_xsettings_watch (gdk_x11_window_get_xid (gdk_screen_get_root_window (screen)), True, client->screen);
 
   check_manager_window (client);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]