Improve window-on-screen intersection test.
ClosedPublic

Authored by hein on Jun 16 2016, 11:01 PM.

Details

Summary

Changes the test from "client rect intersects with screen rect"
to "screen rect contains center of frame (i.e. client plus deco)
rect".

This is a behavior change also vs. libtaskmanager-old and should
address user bug reports like bug 364280.

BUG:364280

Diff Detail

Repository
R120 Plasma Workspace
Branch
blblblbl (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
hein updated this revision to Diff 4565.Jun 16 2016, 11:01 PM
hein retitled this revision from to Improve window-on-screen intersection test..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added a reviewer: Plasma.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 16 2016, 11:01 PM
hein added a reviewer: lbeltrame.
graesslin requested changes to this revision.Jun 17 2016, 6:02 AM
graesslin added a reviewer: graesslin.
graesslin added a subscriber: graesslin.
graesslin added inline comments.
libtaskmanager/xwindowtasksmodel.cpp
790–792

What if the center of the window is not on any screen? Yes that's possible.

KWin's implementation calculates the distance to every screen and uses the minimal distance as the screen it's on. Relevant methods to look at: Toplevel::checkScreen (in toplevel.cpp) and Screens::number in screens.cpp

This revision now requires changes to proceed.Jun 17 2016, 6:02 AM
hein updated this revision to Diff 4570.Jun 17 2016, 7:01 AM
hein edited edge metadata.

Fall back to the screen frameGeometry().center() is closest to.

hein marked an inline comment as done.Jun 17 2016, 7:02 AM
hein added inline comments.
libtaskmanager/xwindowtasksmodel.cpp
790–792

Fixed.

hein updated this revision to Diff 4571.Jun 17 2016, 7:06 AM
hein marked an inline comment as done.
hein edited edge metadata.

Make it not uncompilable nonsense.

graesslin accepted this revision.Jun 17 2016, 7:17 AM
graesslin edited edge metadata.
This revision is now accepted and ready to land.Jun 17 2016, 7:17 AM
This revision was automatically updated to reflect the committed changes.