compositor: Add explicit API call to redirect X11 windows

This is not useful yet, but will be when Xwayland may restart

https://gitlab.gnome.org/GNOME/mutter/merge_requests/709
This commit is contained in:
Carlos Garnacho 2019-05-24 21:04:56 +02:00 committed by Carlos Garnacho
parent 9a10b8ff94
commit 319f7f5b63
3 changed files with 14 additions and 2 deletions

View File

@ -74,4 +74,6 @@ MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (Me
void meta_compositor_locate_pointer (MetaCompositor *compositor);
void meta_compositor_redirect_x11_windows (MetaCompositor *compositor);
#endif /* META_COMPOSITOR_PRIVATE_H */

View File

@ -516,6 +516,15 @@ redirect_windows (MetaX11Display *x11_display)
}
}
void
meta_compositor_redirect_x11_windows (MetaCompositor *compositor)
{
MetaDisplay *display = compositor->display;
if (display->x11_display)
redirect_windows (display->x11_display);
}
void
meta_compositor_manage (MetaCompositor *compositor)
{
@ -595,8 +604,7 @@ meta_compositor_manage (MetaCompositor *compositor)
compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay);
}
if (display->x11_display)
redirect_windows (display->x11_display);
meta_compositor_redirect_x11_windows (compositor);
compositor->plugin_mgr = meta_plugin_manager_new (compositor);
}

View File

@ -648,6 +648,8 @@ meta_display_init_x11 (MetaDisplay *display,
if (!display->display_opening)
meta_display_manage_all_xwindows (display);
meta_compositor_redirect_x11_windows (display->compositor);
return TRUE;
}