mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
xdg_shell: update wlr_toplevel size on client resizes
If a floating client resizes itself, sway updates several of its
internal dimensions to match but not wlr_toplevel. This means that the
next time wlroots sends a toplevel configure event, it can have wrong
coordinates that resize the client back to its old size. To fix this,
let's just use wlr_xdg_toplevel_set_size so the wlr_toplevel has the
same dimensions as sway.
Exactly the same as 0183b9d35d
but the
logic is onlly applied to xdg_shell and not xwayland.
This commit is contained in:
parent
60a94b4916
commit
3d5ae9813d
|
@ -294,6 +294,8 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
|
||||
if (container_is_floating(view->container)) {
|
||||
view_update_size(view);
|
||||
wlr_xdg_toplevel_set_size(view->wlr_xdg_toplevel, view->geometry.width,
|
||||
view->geometry.height);
|
||||
transaction_commit_dirty_client();
|
||||
} else {
|
||||
view_center_surface(view);
|
||||
|
|
Loading…
Reference in a new issue