Bug 485337 - It's possible to drag a window under the bottom of the screen
Summary: It's possible to drag a window under the bottom of the screen
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 17:24 UTC by kevindu52defargoth
Modified: 2024-04-11 19:26 UTC (History)
3 users (show)

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


Attachments
reproduction with a firefox window (2.66 MB, video/webm)
2024-04-10 17:24 UTC, kevindu52defargoth
Details
reproduction with dolphin (3.78 MB, video/webm)
2024-04-10 17:24 UTC, kevindu52defargoth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kevindu52defargoth 2024-04-10 17:24:10 UTC
Created attachment 168351 [details]
reproduction with a firefox window

SUMMARY
Stumbled on a way to drag a window just under the bottom the display.
It then doesn't appear on the overview or desktop grid effects.
It can't be reached using the mouse, since the cursor can't go there.
Looks like an off-by-one error between the cursor and the window's positions.

STEPS TO REPRODUCE
A. With firefox
1. Open a firefox window, and maximize it.
2. Push the cursor to the top of the screen.
3. Click and drag the cursor to the bottom of the screen.

B. With dolphin
1. Open a dolphin window, and maximize it.
2. Push the cursor to the top of the screen.
3. Drag the window using Meta + left click.
4. Push the cursor to the bottom of the screen.


OBSERVED RESULT
The window is completely hidden. There is now no way to interact with it using the mouse.

EXPECTED RESULT
The topmost line of pixel of the window should still be visible on the bottom of the screen.
The window should still appear on the overview effect or the desktop grid.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.6.3
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
On this example there is only one 1920*1080 display connected to the computer.
Comment 1 kevindu52defargoth 2024-04-10 17:24:50 UTC
Created attachment 168352 [details]
reproduction with dolphin
Comment 2 fanzhuyifan 2024-04-11 16:02:49 UTC
Can reproduce with the configuration shown in the video -- with a bottom floating panel set to always visible.

There are two things going on here:

1. with unrestricted move-resize the window can be moved completely offscreen

2. windows that are completely offscreen don't show up in gridview/overview/present windows

Note that the window can still be reached via the tabbox.
Comment 3 Bug Janitor Service 2024-04-11 16:39:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5604
Comment 4 fanzhuyifan 2024-04-11 19:16:06 UTC
Git commit 1a4606d990b89f403e048edef4b07b407b94a370 by Yifan Zhu.
Committed on 11/04/2024 at 16:36.
Pushed by fanzhuyifan into branch 'master'.

scripting/windowmodel: match screen closest to center for filter

When filtering windows by screen, match the screen closest to the window
center, instead of testing whether the window is visible on the current
screen. The new method guarantees that when filtering by screen, the
window appears for exactly one screen. Previously windows spanning
multiple screens appear on all of them, and off-screen windows are not
shown in any screen.
Related: bug 480028

FIXED-IN: 6.0.4

M  +1    -1    src/scripting/windowmodel.cpp

https://invent.kde.org/plasma/kwin/-/commit/1a4606d990b89f403e048edef4b07b407b94a370
Comment 5 fanzhuyifan 2024-04-11 19:26:33 UTC
Git commit fc3a2d0d5d39c3003c2909580bf2c38a1dc6ba1f by Yifan Zhu.
Committed on 11/04/2024 at 19:16.
Pushed by fanzhuyifan into branch 'Plasma/6.0'.

scripting/windowmodel: match screen closest to center for filter

When filtering windows by screen, match the screen closest to the window
center, instead of testing whether the window is visible on the current
screen. The new method guarantees that when filtering by screen, the
window appears for exactly one screen. Previously windows spanning
multiple screens appear on all of them, and off-screen windows are not
shown in any screen.
Related: bug 480028

FIXED-IN: 6.0.4


(cherry picked from commit 1a4606d990b89f403e048edef4b07b407b94a370)

M  +1    -1    src/scripting/windowmodel.cpp

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