mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
Make sure we preserve pre-existing event mask on stage and overlay windows.
This commit is contained in:
parent
b47cd6a3bc
commit
73e14e0bb1
@ -1838,18 +1838,26 @@ get_output_window (MetaScreen *screen)
|
|||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
Window output, xroot;
|
Window output, xroot;
|
||||||
|
XWindowAttributes attr;
|
||||||
|
long event_mask;
|
||||||
|
|
||||||
xroot = meta_screen_get_xroot (screen);
|
xroot = meta_screen_get_xroot (screen);
|
||||||
|
|
||||||
output = XCompositeGetOverlayWindow (xdisplay, xroot);
|
event_mask = FocusChangeMask |
|
||||||
XSelectInput (xdisplay,
|
|
||||||
output,
|
|
||||||
FocusChangeMask |
|
|
||||||
ExposureMask |
|
ExposureMask |
|
||||||
PointerMotionMask |
|
PointerMotionMask |
|
||||||
PropertyChangeMask |
|
PropertyChangeMask |
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
KeyPressMask | KeyReleaseMask);
|
KeyPressMask | KeyReleaseMask;
|
||||||
|
|
||||||
|
output = XCompositeGetOverlayWindow (xdisplay, xroot);
|
||||||
|
|
||||||
|
if (XGetWindowAttributes (xdisplay, output, &attr))
|
||||||
|
{
|
||||||
|
event_mask |= attr.your_event_mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
XSelectInput (xdisplay, output, event_mask);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
@ -1910,6 +1918,8 @@ clutter_cmp_manage_screen (MetaCompositor *compositor,
|
|||||||
Window xroot = meta_screen_get_xroot (screen);
|
Window xroot = meta_screen_get_xroot (screen);
|
||||||
Window xwin;
|
Window xwin;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
XWindowAttributes attr;
|
||||||
|
long event_mask;
|
||||||
|
|
||||||
/* Check if the screen is already managed */
|
/* Check if the screen is already managed */
|
||||||
if (meta_screen_get_compositor_data (screen))
|
if (meta_screen_get_compositor_data (screen))
|
||||||
@ -1951,14 +1961,19 @@ clutter_cmp_manage_screen (MetaCompositor *compositor,
|
|||||||
|
|
||||||
XReparentWindow (xdisplay, xwin, info->output, 0, 0);
|
XReparentWindow (xdisplay, xwin, info->output, 0, 0);
|
||||||
|
|
||||||
XSelectInput (xdisplay,
|
event_mask = FocusChangeMask |
|
||||||
xwin,
|
|
||||||
FocusChangeMask |
|
|
||||||
ExposureMask |
|
ExposureMask |
|
||||||
PointerMotionMask |
|
PointerMotionMask |
|
||||||
PropertyChangeMask |
|
PropertyChangeMask |
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
KeyPressMask | KeyReleaseMask);
|
KeyPressMask | KeyReleaseMask;
|
||||||
|
|
||||||
|
if (XGetWindowAttributes (xdisplay, xwin, &attr))
|
||||||
|
{
|
||||||
|
event_mask |= attr.your_event_mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
XSelectInput (xdisplay, xwin, event_mask);
|
||||||
|
|
||||||
info->window_group = clutter_group_new ();
|
info->window_group = clutter_group_new ();
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user