Bug 476743

Summary: Slowly dragging a window near the panel to let it defloat causes the window to jump up and down while dragging (bumpy effect).
Product: [Plasma] plasmashell Reporter: mrfrh <mrfrh>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: bharadwaj.raju777, nate, niccolo.venerandi
Priority: NOR Keywords: qt6
Version: 5.27.80   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: Video showing the window jumping, repeated two times

Description mrfrh 2023-11-09 09:35:17 UTC
Created attachment 162965 [details]
Video showing the window jumping, repeated two times

SUMMARY
Slowly dragging a window near the panel to let it defloat causes the window to jump up and down while dragging (bumpy effect).

STEPS TO REPRODUCE
1. Open a window (non maximized).
2. Slowly (!) drag the window near the panel to let it defloat.
3. Window will jump while being dragged, see video attachment. The video shows the jumping two times, the second time a bit slower so it's more clear.

OBSERVED RESULT
Windows jumps while being dragged, bumpy effect.

EXPECTED RESULT
Window should not jump while dragging / panel defloat.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  neon-unstable-20231107-1001.iso
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-11-09 19:35:52 UTC
It's the window snapping behavior; the window snaps to the panel edge. It makes sense for an always-visible non-floating panel, which doesn't change its geometry in response to window movement.

But I can see how it makes less sense for a dynamic panel that *does* change its geometry in response to window movement. So perhaps we should disable the "snap to panel" behavior when the panel is in Floating or Dodge Windows mode? Thoughts?
Comment 2 Bharadwaj Raju 2023-11-09 19:40:32 UTC
In the Dodge Windows plasma-desktop MR (https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1813), I changed the unfloat/hide threshold to 12px instead of the earlier 6px. This causes the window to unfloat/hide just before snapping behavior would kick in, and it works out smoothly.
Comment 3 Nate Graham 2023-11-09 19:43:40 UTC
Oh okay, that's another way to fix it, I guess, so feel free to mark that MR as fixing this bug. Or separate that part of the MR out into a new one and fix the bug separately.
Comment 4 Nate Graham 2023-11-17 05:51:49 UTC
That MR landed, and the change in there effectively fixes this issue.