mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
x11: Consolidate root window event setting in one place
No need to duplicate things in xsettings code.
This commit is contained in:
parent
9ed7e883f2
commit
ed38dbe28f
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user