mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
frame: Only XSync when we're on the X11 compositor backend
The only case we have is the case where the two X11 connections are the same. When on Wayland, the XSync is costly and expensive, and we should minimize it.
This commit is contained in:
parent
1af9e92e91
commit
1749a85e96
@ -26,6 +26,7 @@
|
|||||||
#include "bell.h"
|
#include "bell.h"
|
||||||
#include <meta/errors.h>
|
#include <meta/errors.h>
|
||||||
#include "keybindings-private.h"
|
#include "keybindings-private.h"
|
||||||
|
#include "backends/x11/meta-backend-x11.h"
|
||||||
|
|
||||||
#define EVENT_MASK (SubstructureRedirectMask | \
|
#define EVENT_MASK (SubstructureRedirectMask | \
|
||||||
StructureNotifyMask | SubstructureNotifyMask | \
|
StructureNotifyMask | SubstructureNotifyMask | \
|
||||||
@ -159,10 +160,16 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
|
|
||||||
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
|
meta_ui_map_frame (frame->window->screen->ui, frame->xwindow);
|
||||||
|
|
||||||
|
{
|
||||||
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
if (META_IS_BACKEND_X11 (backend))
|
||||||
|
{
|
||||||
/* Since the backend takes keygrabs on another connection, make sure
|
/* Since the backend takes keygrabs on another connection, make sure
|
||||||
* to sync the GTK+ connection to ensure that the frame window has
|
* to sync the GTK+ connection to ensure that the frame window has
|
||||||
* been created on the server at this point. */
|
* been created on the server at this point. */
|
||||||
XSync (window->display->xdisplay, False);
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user