mirror of
https://github.com/brl/mutter.git
synced 2025-03-25 04:33:52 +00:00
frame: Make sure to XSync before grabbing keybindings
Otherwise, the X server might read the backend's connection before GTK+'s, meaning that it sees the XIGrabKeycode requests before the CreateWindow. This fixes keybindings on windows not working immediately. Thanks to Rui Matos <tiagomatos@gmail.com> and Julien Cristau <jcristau@debian.org> for helping track down the issue.
This commit is contained in:
parent
e215c07439
commit
05419b8450
@ -151,10 +151,15 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
window->frame->xwindow,
|
window->frame->xwindow,
|
||||||
window->title);
|
window->title);
|
||||||
|
|
||||||
|
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
|
||||||
|
|
||||||
|
/* Since the backend takes keygrabs on another connection, make sure
|
||||||
|
* to sync the GTK+ connection to ensure that the frame window has
|
||||||
|
* been created on the server at this point. */
|
||||||
|
XSync (window->display->xdisplay, False);
|
||||||
|
|
||||||
/* Move keybindings to frame instead of window */
|
/* Move keybindings to frame instead of window */
|
||||||
meta_window_grab_keys (window);
|
meta_window_grab_keys (window);
|
||||||
|
|
||||||
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user