No need to duplicate things in xsettings code.
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (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);
XSelectInput (GDK_SCREEN_XDISPLAY (screen),
x11_screen->xroot_window,
StructureNotifyMask);
g_hash_table_unref (old_list);
}
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,
static Bool
gdk_xsettings_watch (Window window,
Bool is_start,
client->xsettings_atom = atoms[1];
client->manager_atom = atoms[2];
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);
gdk_xsettings_watch (gdk_x11_window_get_xid (gdk_screen_get_root_window (screen)), True, client->screen);
check_manager_window (client);