xwayland: Use the screen width/height for libdecor state

The configure handler for libdecor, namely handle_libdecor_configure(),
is where both the content and the decorations get resized (when needed).

If for any reason, the actual size of the Xwayland screen fails to be
updated, we would still appy the expected size rather than the actual
one for the libdecor state.

To avoid this, use the actual xwl_screen width/height for the libdecor
state.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit cda004c2a9)
This commit is contained in:
Olivier Fourdan 2023-07-27 08:49:19 +02:00
parent 992d344d8f
commit 5d41621ed9

View file

@ -641,7 +641,7 @@ handle_libdecor_configure(struct libdecor_frame *frame,
}
}
state = libdecor_state_new(width, height);
state = libdecor_state_new(xwl_screen->width, xwl_screen->height);
libdecor_frame_commit(frame, state, configuration);
libdecor_state_free(state);