Bug 480028

Summary: In WindowHeap-based effects, windows placed between two screens appear on both
Product: [Plasma] kwin Reporter: fanzhuyifan
Component: effects-present-windowsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: nate
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.4
Sentry Crash Report:

Description fanzhuyifan 2024-01-19 02:29:43 UTC
Place a window such that it appears on both screens.
Toggle present windows/overview
Note that the window appears on both screens.

Not sure if this is a design choice.
Comment 1 Bug Janitor Service 2024-04-11 16:39:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5604
Comment 2 fanzhuyifan 2024-04-11 19:16:14 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 485337

FIXED-IN: 6.0.4

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

https://invent.kde.org/plasma/kwin/-/commit/1a4606d990b89f403e048edef4b07b407b94a370
Comment 3 fanzhuyifan 2024-04-11 19:26:32 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 485337

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