mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05: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->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 */
|
||||
meta_window_grab_keys (window);
|
||||
|
||||
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user