Bug 461987 - Window resizing snaps to the edge of a hidden panel
Summary: Window resizing snaps to the edge of a hidden panel
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.3
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-11-18 11:20 UTC by Mark Bolhuis
Modified: 2024-09-28 02:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Bolhuis 2022-11-18 11:20:02 UTC
SUMMARY
When resizing a window towards a panel the edge of the window snaps to a line where the edge of the panel would be if visible.

STEPS TO REPRODUCE
Assume that the panel is placed along the bottom, although the bug appears for all placements.

1. Configure the panel to auto-hide.
2. Open any GUI app.
2. Resize the window from the bottom down to where the top edge of the panel would be if visible.

OBSERVED RESULT
The window edge snaps to a line offset by the height of the panel above the output edge.

EXPECTED RESULT
The window should snap to the edge of the output.

NOTES
Occurs on both Wayland and X11
Does not occur when dragging the entire window down, only when resizing down.

SOFTWARE/OS VERSIONS
Linux arch 6.0.8-arch1-1
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Comment 1 Bug Janitor Service 2024-09-23 11:20:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6467
Comment 2 Vlad Zahorodnii 2024-09-27 23:05:27 UTC
Git commit 260319c30fbd2d97f3d25815e61c23b875011c79 by Vlad Zahorodnii.
Committed on 27/09/2024 at 22:57.
Pushed by vladz into branch 'master'.

Prevent snapping resized window to hidden windows

Workspace::adjustWindowPosition() properly handles hidden windows and it
also excludes more window types, but Workspace::adjustWindowSize() only
shares a small fraction of those checks due to getting out of sync because
of code duplication.

M  +19   -25   src/workspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/260319c30fbd2d97f3d25815e61c23b875011c79
Comment 3 Vlad Zahorodnii 2024-09-27 23:18:13 UTC
Git commit bcee5c586a8e5b331a128c43bccf626793f80068 by Vlad Zahorodnii.
Committed on 27/09/2024 at 23:06.
Pushed by vladz into branch 'Plasma/6.2'.

Prevent snapping resized window to hidden windows

Workspace::adjustWindowPosition() properly handles hidden windows and it
also excludes more window types, but Workspace::adjustWindowSize() only
shares a small fraction of those checks due to getting out of sync because
of code duplication.


(cherry picked from commit 260319c30fbd2d97f3d25815e61c23b875011c79)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +19   -25   src/workspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/bcee5c586a8e5b331a128c43bccf626793f80068