mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
shells: Resize on commit if geometry x/y changes
Client-side decorations lead to changes to y position, so make sure we catch that.
This commit is contained in:
parent
5a4a7bc0da
commit
f8dd7df1f5
|
@ -284,7 +284,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
wlr_xdg_surface_get_geometry(xdg_surface, &new_geo);
|
||||
|
||||
if ((new_geo.width != view->geometry.width ||
|
||||
new_geo.height != view->geometry.height)) {
|
||||
new_geo.height != view->geometry.height ||
|
||||
new_geo.x != view->geometry.x ||
|
||||
new_geo.y != view->geometry.y)) {
|
||||
// The view has unexpectedly sent a new size
|
||||
desktop_damage_view(view);
|
||||
view_update_size(view, new_geo.width, new_geo.height);
|
||||
|
|
|
@ -373,7 +373,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
get_geometry(view, &new_geo);
|
||||
|
||||
if ((new_geo.width != view->geometry.width ||
|
||||
new_geo.height != view->geometry.height)) {
|
||||
new_geo.height != view->geometry.height ||
|
||||
new_geo.x != view->geometry.x ||
|
||||
new_geo.y != view->geometry.y)) {
|
||||
// The view has unexpectedly sent a new size
|
||||
// eg. The Firefox "Save As" dialog when downloading a file
|
||||
desktop_damage_view(view);
|
||||
|
|
Loading…
Reference in a new issue