sway icon indicating copy to clipboard operation
sway copied to clipboard

sway resizes floating windows back to their old size

Open the-isz opened this issue 4 years ago • 3 comments

Hi sway developers/community!

While writing a GUI application that resizes its window programmatically, I came across the following... weirdness:

When moving the mouse cursor out of a floating window's area, sway sends a resize event to the window, resizing it back to its original size.

I'm not sure if this is by design or an actual issue.

I have created a minimal reproduction program including a step-by-step guide in this gist.

$ swaymsg -t get_version
sway version 1.4

Thanks for looking into this and for gifting the world (including me) with this brilliant window manager!

Best regards

the-isz avatar Apr 27 '20 21:04 the-isz

Thanks for the concise reproduction! Running it on my system with debugging on shows:

$ WAYLAND_DEBUG=1 QT_QPA_PLATFORM=wayland-egl unbuffer python3 resize_issue.py | grep --line-buffered xdg
...
[4276237.687] [email protected](102, 50, array)
[4276237.698] [email protected](39933)
[4276237.730]  -> [email protected]_window_geometry(0, 0, 102, 50)
[4276237.743]  -> [email protected]_min_size(102, 45)
[4276237.750]  -> [email protected]_max_size(0, 0)
[4276237.755]  -> [email protected]_configure(39933)

*clicked resize button here*

[4279307.303]  -> [email protected]_window_geometry(0, 0, 400, 400)

*left window here*

[4285005.302] [email protected](102, 50, array)
[4285005.311] [email protected](39941)
[4285005.337]  -> [email protected]_window_geometry(0, 0, 102, 50)
[4285005.350]  -> [email protected]_min_size(102, 45)
[4285005.356]  -> [email protected]_max_size(0, 0)
[4285005.362]  -> [email protected]_configure(39941)

This sounds like it'd be a wlroots issue. sway sends [email protected](102, 50, array) when the window is left, where GNOME sends [email protected](400, 400, array) and the issue doesn't manifest.

Xyene avatar Apr 27 '20 22:04 Xyene

Glad I could give something back :)

Let me know if you need more information or if I can help some other way.

the-isz avatar Apr 28 '20 13:04 the-isz

Getting really annoyed by this myself. I think the behavior from i3 should be maintained on floating windows.

gunslingerfry avatar Aug 25 '22 20:08 gunslingerfry

what's the status of this issue? I can reproduce the same thing with my experimental wayland Godot branch.

Riteo avatar Dec 15 '22 15:12 Riteo