mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 20:28:19 +02:00
xwayland: Do not set root clip when rootless
Otherwise the server may try to draw onto the root window when closing
down, but when running rootless the root window has no storage thus
causing a memory corruption.
Thanks to Adam Jackson <ajax@redhat.com> for helping tracking this down!
Reviewed-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93045
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Tested-by: Marek Chalupa <mchqwerty@gmail.com>
(cherry picked from commit 51a4399b94)
This commit is contained in:
parent
0a500c3cc7
commit
74354c4b00
3 changed files with 10 additions and 4 deletions
|
|
@ -233,9 +233,11 @@ xwl_glamor_create_screen_resources(ScreenPtr screen)
|
|||
if (!ret)
|
||||
return ret;
|
||||
|
||||
if (xwl_screen->rootless)
|
||||
if (xwl_screen->rootless) {
|
||||
screen->devPrivate =
|
||||
fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0);
|
||||
SetRootClip(screen, FALSE);
|
||||
}
|
||||
else {
|
||||
screen->devPrivate =
|
||||
xwl_glamor_create_pixmap(screen, screen->width, screen->height,
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ output_handle_done(void *data, struct wl_output *wl_output)
|
|||
--xwl_screen->expecting_event;
|
||||
}
|
||||
|
||||
if (xwl_screen->screen->root)
|
||||
if (!xwl_screen->rootless)
|
||||
SetRootClip(xwl_screen->screen, FALSE);
|
||||
|
||||
xwl_screen->width = width;
|
||||
|
|
@ -206,11 +206,13 @@ output_handle_done(void *data, struct wl_output *wl_output)
|
|||
if (xwl_screen->screen->root) {
|
||||
xwl_screen->screen->root->drawable.width = width;
|
||||
xwl_screen->screen->root->drawable.height = height;
|
||||
SetRootClip(xwl_screen->screen, TRUE);
|
||||
RRScreenSizeNotify(xwl_screen->screen);
|
||||
}
|
||||
|
||||
update_desktop_dimensions();
|
||||
|
||||
if (!xwl_screen->rootless)
|
||||
SetRootClip(xwl_screen->screen, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -279,9 +279,11 @@ xwl_shm_create_screen_resources(ScreenPtr screen)
|
|||
if (!ret)
|
||||
return ret;
|
||||
|
||||
if (xwl_screen->rootless)
|
||||
if (xwl_screen->rootless) {
|
||||
screen->devPrivate =
|
||||
fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0);
|
||||
SetRootClip(screen, FALSE);
|
||||
}
|
||||
else
|
||||
screen->devPrivate =
|
||||
xwl_shm_create_pixmap(screen, screen->width, screen->height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue