screen: Fetch the COW window up-front
XGetCompositeOverlayWindow is a round trip to the X server. We shouldn't be doing it on every MapWindow.
This commit is contained in:
@ -119,6 +119,8 @@ struct _MetaScreen
|
||||
* and restack them below a guard window. When using a compositor
|
||||
* this allows us to provide live previews of unmapped windows */
|
||||
Window guard_window;
|
||||
|
||||
Window composite_overlay_window;
|
||||
};
|
||||
|
||||
struct _MetaScreenClass
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "meta-cursor-tracker-private.h"
|
||||
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <locale.h>
|
||||
@ -700,6 +701,8 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->starting_corner = META_SCREEN_TOPLEFT;
|
||||
screen->guard_window = None;
|
||||
|
||||
screen->composite_overlay_window = XCompositeGetOverlayWindow (xdisplay, xroot);
|
||||
|
||||
reload_monitor_infos (screen);
|
||||
|
||||
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
|
||||
|
Reference in New Issue
Block a user