diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index eced04706..7481fa563 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -159,8 +159,6 @@ get_output_window (MetaCompositor *compositor) output = XCompositeGetOverlayWindow (xdisplay, DefaultRootWindow (xdisplay)); - meta_core_add_old_event_mask (xdisplay, output, &mask); - XISetMask (mask.mask, XI_KeyPress); XISetMask (mask.mask, XI_KeyRelease); XISetMask (mask.mask, XI_ButtonPress); @@ -518,8 +516,6 @@ meta_compositor_manage (MetaCompositor *compositor) unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; - meta_core_add_old_event_mask (backend_xdisplay, xwin, &mask); - XISetMask (mask.mask, XI_KeyPress); XISetMask (mask.mask, XI_KeyRelease); XISetMask (mask.mask, XI_ButtonPress); diff --git a/src/core/core.c b/src/core/core.c index c9ba035b3..cbb006a65 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -516,25 +516,3 @@ meta_invalidate_default_icons (void) g_slist_free (windows); } - -void -meta_core_add_old_event_mask (Display *xdisplay, - Window xwindow, - XIEventMask *mask) -{ - XIEventMask *prev; - gint n_masks, i, j; - - prev = XIGetSelectedEvents (xdisplay, xwindow, &n_masks); - - for (i = 0; i < n_masks; i++) - { - if (prev[i].deviceid != XIAllMasterDevices) - continue; - - for (j = 0; j < MIN (mask->mask_len, prev[i].mask_len); j++) - mask->mask[j] |= prev[i].mask[j]; - } - - XFree (prev); -} diff --git a/src/core/core.h b/src/core/core.h index a42884f39..0e84ad137 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -169,8 +169,4 @@ void meta_core_set_screen_cursor (Display *xdisplay, void meta_invalidate_default_icons (void); -void meta_core_add_old_event_mask (Display *xdisplay, - Window xwindow, - XIEventMask *mask); - #endif diff --git a/src/core/screen.c b/src/core/screen.c index 0b0dc7e9e..fbd3e7d01 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -620,17 +620,12 @@ meta_screen_new (MetaDisplay *display, /* select our root window events */ meta_error_trap_push (display); - /* We need to or with the existing event mask since - * gtk+ may be interested in other events. - */ { long event_mask; unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; XWindowAttributes attr; - meta_core_add_old_event_mask (xdisplay, xroot, &mask); - XISetMask (mask.mask, XI_KeyPress); XISetMask (mask.mask, XI_KeyRelease); XISetMask (mask.mask, XI_Enter); diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 059cc8163..29976d29d 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -3074,8 +3074,6 @@ meta_window_x11_new (MetaDisplay *display, unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; - meta_core_add_old_event_mask (display->xdisplay, xwindow, &mask); - XISetMask (mask.mask, XI_Enter); XISetMask (mask.mask, XI_Leave); XISetMask (mask.mask, XI_FocusIn);