wayland: Adds basic hybrid X + Wayland support
This adds support for running mutter as a hybrid X and Wayland compositor. It runs a headless XWayland server for X applications that presents wayland surfaces back to mutter which mutter can then composite. This aims to not break Mutter's existing support for the traditional X compositing model which means a single build of Mutter can be distributed supporting the traditional model and the new Wayland based compositing model. TODO: although building with --disable-wayland has at least been tested, I still haven't actually verified that running as a traditional compositor isn't broken currently. Note: At this point no input is supported Note: multiple authors have contributed to this patch: Authored-by: Robert Bragg <robert@linux.intel.com> Authored-by: Neil Roberts <neil@linux.intel.com> Authored-by: Rico Tzschichholz. Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
This commit is contained in:

committed by
Jasper St. Pierre

parent
bd3c357212
commit
f9a11b3b18
@@ -931,8 +931,24 @@ meta_display_open (void)
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaScreen *screen = tmp->data;
|
||||
|
||||
meta_screen_manage_all_windows (screen);
|
||||
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
/* Instead of explicitly enumerating all windows during
|
||||
* initialization, when we run as a wayland compositor we can rely on
|
||||
* xwayland notifying us of all top level windows so we create
|
||||
* MetaWindows when we get those notifications.
|
||||
*
|
||||
* 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);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
@@ -2284,8 +2300,8 @@ event_callback (XEvent *event,
|
||||
}
|
||||
|
||||
if (display->compositor)
|
||||
meta_compositor_window_shape_changed (display->compositor,
|
||||
window);
|
||||
meta_compositor_window_x11_shape_changed (display->compositor,
|
||||
window);
|
||||
}
|
||||
else if (sev->kind == ShapeInput)
|
||||
{
|
||||
@@ -2311,8 +2327,8 @@ event_callback (XEvent *event,
|
||||
}
|
||||
|
||||
if (display->compositor)
|
||||
meta_compositor_window_shape_changed (display->compositor,
|
||||
window);
|
||||
meta_compositor_window_x11_shape_changed (display->compositor,
|
||||
window);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user