mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
Make sure to include the old XI2 mask when selecting for events
Some windows may already have event masks on them that we've selected for, especially if we're using GTK+ windows. In particular, this fixes window menus in the XI2 port. https://bugzilla.gnome.org/show_bug.cgi?id=690581
This commit is contained in:
parent
d794db876a
commit
453020c315
@ -4,6 +4,7 @@
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
#include "core.h"
|
||||
#include <meta/screen.h>
|
||||
#include <meta/errors.h>
|
||||
#include <meta/window.h>
|
||||
@ -163,6 +164,8 @@ get_output_window (MetaScreen *screen)
|
||||
xroot = meta_screen_get_xroot (screen);
|
||||
output = XCompositeGetOverlayWindow (xdisplay, xroot);
|
||||
|
||||
meta_core_add_old_event_mask (xdisplay, output, &mask);
|
||||
|
||||
XISetMask (mask.mask, XI_KeyPress);
|
||||
XISetMask (mask.mask, XI_KeyRelease);
|
||||
XISetMask (mask.mask, XI_ButtonPress);
|
||||
@ -550,6 +553,8 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||
XWindowAttributes attr;
|
||||
|
||||
meta_core_add_old_event_mask (xdisplay, xwin, &mask);
|
||||
|
||||
XISetMask (mask.mask, XI_KeyPress);
|
||||
XISetMask (mask.mask, XI_KeyRelease);
|
||||
XISetMask (mask.mask, XI_ButtonPress);
|
||||
|
@ -748,6 +748,8 @@ meta_screen_new (MetaDisplay *display,
|
||||
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);
|
||||
|
@ -939,6 +939,8 @@ meta_window_new_with_attrs (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);
|
||||
|
Loading…
Reference in New Issue
Block a user