Open tarek-y-ismail opened 1 month ago
Hmm. I've not seen this, but I've been using the preview Wayland support for the past few weeks
Hmm. I've not seen this, but I've been using the preview Wayland support for the past few weeks
I can confirm the above weirdness. I wonder if it is related to the clipping mentioned in https://github.com/canonical/mir/issues/3560#issuecomment-2306522977
Happens as far back as 2.13 (can't get earlier versions to build)
So I found the cause of the bug. If you watch the video, you'll see it happening with only vertical or horizontal resizing and not corner resizing (although that's broken as well).
The culprit was these few lines: https://github.com/canonical/mir/blob/b56aa20a219a29b6b23d3a8742e0507b7ee82622/src/server/frontend_xwayland/xwayland_surface.cpp#L1231-L1237
Which broke this conversion from shell::SurfaceSpecification
to miral::WindowSpecification
:
https://github.com/canonical/mir/blob/b56aa20a219a29b6b23d3a8742e0507b7ee82622/src/miral/window_specification.cpp#L88-L89
The most apparent solution is to consume both the width and height if they're both equal to the current content size, otherwise, both pass even if one hasn't changed. Another solution would be to modify the logic of miral::WindowSpecification
to allow width and height to be set separately, but that'll probably open up another can of worms that is probably better left closed
This also exhibits something similar to #3560 and corner resizing, where resizing stops immediately once the cursor leaves the application window. In #3560, this manifests by not being able to resize at all as the widgets are outside the visible window.
How to reproduce
https://github.com/user-attachments/assets/fa0c5b7a-f12e-46a1-b132-f1745396ae22