[Differential] [Requested Changes To] D1925: Improve window-on-screen intersection test.
graesslin (Martin Gräßlin)
noreply at phabricator.kde.org
Fri Jun 17 06:02:16 UTC 2016
graesslin requested changes to this revision.
graesslin added a reviewer: graesslin.
graesslin added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> xwindowtasksmodel.cpp:785
> for (int i = 0; i < screens.count(); ++i) {
> - if (screens.at(i)->geometry().intersects(info->geometry())) {
> + if (screens.at(i)->geometry().contains(info->frameGeometry().center())) {
> return i;
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
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D1925
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: hein, luebking, lbeltrame, #plasma, graesslin
Cc: graesslin, plasma-devel, jensreuterberg, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160617/b5bdc6e1/attachment-0001.html>
More information about the Plasma-devel
mailing list