mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 23:08:04 +02:00
xwayland: Use update size from libdecor configure handler
This is to avoid repeating the same code in two places. This is essentially a cosmetic change, not a functional change. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
parent
c180eca8ef
commit
f19fe9d260
1 changed files with 2 additions and 4 deletions
|
|
@ -643,7 +643,6 @@ handle_libdecor_configure(struct libdecor_frame *frame,
|
||||||
{
|
{
|
||||||
struct xwl_window *xwl_window = data;
|
struct xwl_window *xwl_window = data;
|
||||||
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
|
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
|
||||||
struct libdecor_state *state;
|
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
if (!libdecor_configuration_get_content_size(configuration, frame, &width, &height)) {
|
if (!libdecor_configuration_get_content_size(configuration, frame, &width, &height)) {
|
||||||
|
|
@ -654,9 +653,8 @@ handle_libdecor_configure(struct libdecor_frame *frame,
|
||||||
if (xwl_screen->width != width || xwl_screen->height != height)
|
if (xwl_screen->width != width || xwl_screen->height != height)
|
||||||
xwl_window_libdecor_resize(xwl_window, width, height);
|
xwl_window_libdecor_resize(xwl_window, width, height);
|
||||||
|
|
||||||
state = libdecor_state_new(xwl_screen->width, xwl_screen->height);
|
xwl_window_update_libdecor_size(xwl_window, configuration,
|
||||||
libdecor_frame_commit(frame, state, configuration);
|
xwl_screen->width, xwl_screen->height);
|
||||||
libdecor_state_free(state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue