xwayland: update the Xwayland screen size first
When updating the overall screen size, Xwayland would first walk the window tree then update both the xwl_screen and screen size. As a result, if any ResizeWindow() handler tries to use the xwl_screen size, it would get the old (wrong) size instead of the new one. Make sure to update the xwl_screen size first, prior to traverse the window tree. This is preparation work for Xwayland fullscreen mode. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
28e5faab28
commit
5ef4ad0af2
|
@ -184,14 +184,15 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
|
|||
static void
|
||||
update_screen_size(struct xwl_screen *xwl_screen, int width, int height)
|
||||
{
|
||||
xwl_screen->width = width;
|
||||
xwl_screen->height = height;
|
||||
|
||||
if (xwl_screen->root_clip_mode == ROOT_CLIP_FULL)
|
||||
SetRootClip(xwl_screen->screen, ROOT_CLIP_NONE);
|
||||
|
||||
if (!xwl_screen->rootless && xwl_screen->screen->root)
|
||||
update_backing_pixmaps (xwl_screen, width, height);
|
||||
|
||||
xwl_screen->width = width;
|
||||
xwl_screen->height = height;
|
||||
xwl_screen->screen->width = width;
|
||||
xwl_screen->screen->height = height;
|
||||
xwl_screen->screen->mmWidth = (width * 25.4) / monitorResolution;
|
||||
|
|
Loading…
Reference in New Issue