Bug 495273

Summary: KWin 'Move Window to the Center' and 'Snap Helper' disagree on center
Product: [Plasma] kwin Reporter: Zach Dykstra <dykstra.zachary>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: chiitoo, marcel_s
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Zach Dykstra 2024-10-23 21:51:28 UTC
SUMMARY

After enabling Window Management -> Desktop Effects -> Snap Helper, and then setting a keyboard shortcut for Keyboard -> Shortcuts -> KWin Move Window to the Center, they don't agree on what is actually the center of the screen. 

STEPS TO REPRODUCE
0. Configure a single panel on the screen, always shown.
1. Use the keyboard shortcut to move a window to the center of the screen
2. 'Grab' a window to move it (normally Meta + mouse  button 1) 
3. Compare the grid lines drawn by 'Snap Helper' to the actual placement of the window.

OBSERVED RESULT

The window on the screen is consistently to one side of the center grid lines drawn by 'Snap Helper'. If the panel is on the bottom of the screen, the window is pushed up out of the center grid lines. If the panel is on the left side of the screen, the window is pushed to the right of the grid lines. The size of the panel does influence how far off center the window is.

EXPECTED RESULT

The window on the screen will fit within the center grid lines drawn by 'Snap Helper', regardless of the panel(s) on the screen.

SOFTWARE/OS VERSIONS
Operating System: Void 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.14_2 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 13th Gen Intel® Core™ i7-13700
Memory: 62.4 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Comment 1 Nate Graham 2024-12-20 19:17:55 UTC
*** Bug 497710 has been marked as a duplicate of this bug. ***
Comment 2 Chiitoo 2025-07-06 16:29:26 UTC
I suppose this one is obsolete, since 'Snap Helper' has (unfortunately) been removed [1] in 6.4.0 (and I guess somewhere after 6.3.5 from the looks of it too).

1. https://invent.kde.org/plasma/kwin/-/commit/123c7f07f84f92d51ed159eff6e118e612d4fc74