Bug 464985 - Struts of panels affect windows on other screens with no panels, causing stickiness when dragging close to a screen edge and incorrect maximize areas
Summary: Struts of panels affect windows on other screens with no panels, causing stic...
Status: RESOLVED DUPLICATE of bug 349191
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.26.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, wayland
Depends on:
Blocks:
 
Reported: 2023-01-29 14:41 UTC by Jonas Rakebrandt
Modified: 2023-09-18 21:01 UTC (History)
4 users (show)

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


Attachments
kwin patch (1.49 KB, patch)
2023-05-09 20:43 UTC, Jonas Rakebrandt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Rakebrandt 2023-01-29 14:41:16 UTC
SUMMARY
***
When dragging windows with server side decoration to the top edge of the screen they get stuck (the window stops moving up as if it already reached the edge). 
They get stuck earlier when scaling is involved.
Client side decorated windows are not affected.
It happens consistently after un-minimizing.
Maximizing and un-maximizing sometimes temporarily "fixes" it.
The window snaps back to the cursor when it either reaches the screen edge or a panel located at the top screen edge.

STEPS TO REPRODUCE
1. Minimize and un-minimize a non-maximized server side decorated window
2. Drag the window to the top screen edge

OBSERVED RESULT
The window gets stuck and stops following the cursor

EXPECTED RESULT
The window continues moving with the cursor

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.13
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.8-x86_64-xanmod1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Comment 1 Jonas Rakebrandt 2023-01-29 15:04:19 UTC
A video showing what was described: https://youtu.be/lFZyV1ud-ro
Comment 2 Nate Graham 2023-02-06 18:09:07 UTC
Does it stop happening if you disable the "Floating Panel" behavior?
Comment 3 Jonas Rakebrandt 2023-02-06 18:24:21 UTC
As far as I can tell the panel doesn't affect this issue in any way.
It can be floating, non-floating, completely gone - the windows get stuck at the same height.
Comment 4 Vlad Zahorodnii 2023-02-07 08:24:45 UTC
Can't reproduce
Comment 5 Nate Graham 2023-02-11 01:22:14 UTC
Also can't reproduce with current git master, in either X11 or Wayland.
Comment 6 Jonas Rakebrandt 2023-02-14 16:39:09 UTC
Just updated to 5.27.0 and the issue still exists. However I think I found some more info:

1) This only happens with multiple monitors.
2) When dragging a window that "got stuck" horizontally along the height where it gets stuck 
    it perfectly aligns with other top located panels.

This leads me to the conclusion that windows snap to panels of other screens.
Is it possible that the panels "snap regions" somehow extend across screen boundaries?
Comment 7 Jonas Rakebrandt 2023-02-14 16:50:05 UTC
Another video showing this: https://youtu.be/9uAjvfUVa44
Comment 8 Nate Graham 2023-02-14 17:51:49 UTC
Great, I can 100% reproduce that now! Definitely the struts of the panel on a different screen are bleeding into other ones, causing that "stickiness" you're encountering.
Comment 9 Jonas Rakebrandt 2023-05-09 20:43:16 UTC
Created attachment 158812 [details]
kwin patch

Did some digging through kwin's code myself to try finding the issue and the changes in the attached diff are my best bet so far. As far as I can tell this doesn't cause any other issues but fixes this issue. Kind of feels like a hack though.
Comment 10 Nate Graham 2023-06-05 17:06:51 UTC
*** Bug 470496 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2023-09-14 20:03:38 UTC
*** Bug 474502 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2023-09-18 21:01:47 UTC

*** This bug has been marked as a duplicate of bug 349191 ***