mirror of
https://github.com/brl/mutter.git
synced 2025-08-03 23:24:40 +00:00
Select for XI2 events everywhere else
In random places that are not grabs, we selected for events on things like the root window, stage window, COW and more. Switch these over to using the proper XI2 APIs. https://bugzilla.gnome.org/show_bug.cgi?id=688779
This commit is contained in:
@@ -922,9 +922,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
XAddToSaveSet (display->xdisplay, xwindow);
|
||||
meta_error_trap_pop_with_return (display);
|
||||
|
||||
event_mask =
|
||||
PropertyChangeMask | EnterWindowMask | LeaveWindowMask |
|
||||
FocusChangeMask | ColormapChangeMask;
|
||||
event_mask = PropertyChangeMask | ColormapChangeMask;
|
||||
if (attrs->override_redirect)
|
||||
event_mask |= StructureNotifyMask;
|
||||
|
||||
@@ -934,6 +932,18 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
*/
|
||||
XSelectInput (display->xdisplay, xwindow, attrs->your_event_mask | event_mask);
|
||||
|
||||
{
|
||||
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
|
||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||
|
||||
XISetMask (mask.mask, XI_Enter);
|
||||
XISetMask (mask.mask, XI_Leave);
|
||||
XISetMask (mask.mask, XI_FocusIn);
|
||||
XISetMask (mask.mask, XI_FocusOut);
|
||||
|
||||
XISelectEvents (display->xdisplay, xwindow, &mask, 1);
|
||||
}
|
||||
|
||||
has_shape = FALSE;
|
||||
#ifdef HAVE_SHAPE
|
||||
if (META_DISPLAY_HAS_SHAPE (display))
|
||||
|
Reference in New Issue
Block a user