mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
display: Clean up creation of the guard window a bit...
Do it consistently in all code paths...
This commit is contained in:
parent
66c4555dc7
commit
3e73babaf7
@ -830,22 +830,12 @@ meta_display_open (void)
|
|||||||
{
|
{
|
||||||
MetaScreen *screen = tmp->data;
|
MetaScreen *screen = tmp->data;
|
||||||
|
|
||||||
if (meta_is_wayland_compositor ())
|
meta_screen_create_guard_window (screen);
|
||||||
{
|
|
||||||
/* Instead of explicitly enumerating all windows during
|
/* We know that if mutter is running as a Wayland compositor,
|
||||||
* initialization, when we run as a wayland compositor we can rely on
|
* we start out with no windows.
|
||||||
* xwayland notifying us of all top level windows so we create
|
*/
|
||||||
* MetaWindows when we get those notifications.
|
if (!meta_is_wayland_compositor ())
|
||||||
*
|
|
||||||
* We still want a guard window so we can avoid
|
|
||||||
* unmapping/withdrawing minimized windows for live
|
|
||||||
* thumbnails...
|
|
||||||
*/
|
|
||||||
if (screen->guard_window == None)
|
|
||||||
screen->guard_window =
|
|
||||||
meta_screen_create_guard_window (screen->display->xdisplay, screen);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
meta_screen_manage_all_windows (screen);
|
meta_screen_manage_all_windows (screen);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
|
@ -445,8 +445,8 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
* should effectively be forwarded to events on the background actor,
|
* should effectively be forwarded to events on the background actor,
|
||||||
* providing that the scene graph is set up correctly.
|
* providing that the scene graph is set up correctly.
|
||||||
*/
|
*/
|
||||||
Window
|
static Window
|
||||||
meta_screen_create_guard_window (Display *xdisplay, MetaScreen *screen)
|
create_guard_window (Display *xdisplay, MetaScreen *screen)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes attributes;
|
XSetWindowAttributes attributes;
|
||||||
Window guard_window;
|
Window guard_window;
|
||||||
@ -877,6 +877,13 @@ meta_screen_free (MetaScreen *screen,
|
|||||||
meta_display_ungrab (display);
|
meta_display_ungrab (display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_screen_create_guard_window (MetaScreen *screen)
|
||||||
|
{
|
||||||
|
if (screen->guard_window == None)
|
||||||
|
screen->guard_window = create_guard_window (screen->display->xdisplay, screen);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_screen_manage_all_windows (MetaScreen *screen)
|
meta_screen_manage_all_windows (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
@ -884,10 +891,6 @@ meta_screen_manage_all_windows (MetaScreen *screen)
|
|||||||
MetaStackWindow *children;
|
MetaStackWindow *children;
|
||||||
int n_children, i;
|
int n_children, i;
|
||||||
|
|
||||||
if (screen->guard_window == None)
|
|
||||||
screen->guard_window =
|
|
||||||
meta_screen_create_guard_window (screen->display->xdisplay, screen);
|
|
||||||
|
|
||||||
meta_stack_freeze (screen->stack);
|
meta_stack_freeze (screen->stack);
|
||||||
meta_stack_tracker_get_stack (screen->stack_tracker, &_children, &n_children);
|
meta_stack_tracker_get_stack (screen->stack_tracker, &_children, &n_children);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user