Bug 472366 - Unsnapping a quick-tiled window by dragging may drag the window by a point outside its titlebar
Summary: Unsnapping a quick-tiled window by dragging may drag the window by a point ou...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Quick Tiling (show other bugs)
Version: 5.93.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-18 17:12 UTC by Zeb Figura
Modified: 2024-02-26 15:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zeb Figura 2023-07-18 17:12:00 UTC
SUMMARY

Due to the changes in 5.27, a quick-tiled window will remember its previous size, and revert to that when un-tiled. In particular, as soon as one grabs the titlebar and drags the window, it will revert to its previous size for the drag.

However, if a window's previous size was sufficiently small, and one drags the titlebar near the rightmost edge, this can result in "holding" the window from a point that is not actually inside of the window. The window drags correctly, but this is visually confusing, and prevents the user from moving the window to the right side of the screen in the same gesture (i.e. she has to put down the window and pick it back up again first).

STEPS TO REPRODUCE
1. Make a window arbitrarily thin.
2. Drag it to the left side of the screen so that it quick-tiles to the left half of the screen.
3. Click down on a point near the right side of the titlebar, and drag it off the left side of the screen.

OBSERVED RESULT

The mouse will not be over the titlebar of the window, but rather to the right of it.

EXPECTED RESULT

The window should be placed somewhere such that the mouse is over the titlebar. Simply always defaulting to the center may make sense, although more sophisticated algorithms are also possible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian GNU/Linux 12
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.8
Comment 1 fanzhuyifan 2024-02-25 17:20:29 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2024-02-26 06:32:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5297
Comment 3 Vlad Zahorodnii 2024-02-26 11:18:32 UTC
Git commit 192ec437df339767f09363d3f6638b5872062e0b by Vlad Zahorodnii, on behalf of Ser Freeman.
Committed on 26/02/2024 at 11:11.
Pushed by vladz into branch 'master'.

Window: Don't reset quick tile mode on interactive move start

Quick tile mode reset should be done in the interactive move handler,
where the new move offset is set. Only reset it on resize to unsnap
the window from the tile.

M  +1    -1    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/192ec437df339767f09363d3f6638b5872062e0b
Comment 4 Vlad Zahorodnii 2024-02-26 11:35:54 UTC
Git commit 7a3693867284cc72932ee8901e7e79a3681aee13 by Vlad Zahorodnii, on behalf of Ser Freeman.
Committed on 26/02/2024 at 11:27.
Pushed by vladz into branch 'Plasma/6.0'.

Window: Don't reset quick tile mode on interactive move start

Quick tile mode reset should be done in the interactive move handler,
where the new move offset is set. Only reset it on resize to unsnap
the window from the tile.


(cherry picked from commit 192ec437df339767f09363d3f6638b5872062e0b)

M  +1    -1    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/7a3693867284cc72932ee8901e7e79a3681aee13