xwayland: Apply root toplevel configure dimensions
While we now have support for resize of the root window through libdecor, we still ignore toplevel configure dimensions when libdecor is not in use. This ignores user intent in many Wayland servers, and some xdg_toplevel states when active have strong requirements for adherence to configure dimensions. Resize in response to xdg_toplevel configure dimensions like we do for libdecor configure events. Signed-off-by: Kenny Levinsen <kl@kl.wtf>
This commit is contained in:
parent
4f869c6eda
commit
53b6d4db7e
|
@ -765,6 +765,14 @@ xdg_toplevel_handle_configure(void *data,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *states)
|
struct wl_array *states)
|
||||||
{
|
{
|
||||||
|
struct xwl_window *xwl_window = data;
|
||||||
|
|
||||||
|
/* Maintain our current size if no dimensions are requested */
|
||||||
|
if (width == 0 && height == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* This will be committed by the xdg_surface.configure handler */
|
||||||
|
xwl_window_maybe_resize(xwl_window, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -823,7 +831,7 @@ xwl_create_root_surface(struct xwl_window *xwl_window)
|
||||||
|
|
||||||
xdg_toplevel_add_listener(xwl_window->xdg_toplevel,
|
xdg_toplevel_add_listener(xwl_window->xdg_toplevel,
|
||||||
&xdg_toplevel_listener,
|
&xdg_toplevel_listener,
|
||||||
NULL);
|
xwl_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
xwl_window_rootful_update_title(xwl_window);
|
xwl_window_rootful_update_title(xwl_window);
|
||||||
|
|
Loading…
Reference in New Issue