From 1819ad69b26b8980880d31031b300a1dc7ad4e24 Mon Sep 17 00:00:00 2001 From: "Aike J. Sommer" Date: Fri, 2 May 2008 16:35:35 +0000 Subject: [PATCH] Allow desktop-type windows to only span one xrandr/mergedfb/xinerama-screen instead of all screens combined. svn path=/trunk/KDE/kdebase/workspace/; revision=803349 --- geometry.cpp | 6 ++++++ manage.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 26eed0a34e..3b6b6bb81c 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -32,6 +32,7 @@ along with this program. If not, see . #include #include #include +#include #include #include "placement.h" @@ -875,6 +876,11 @@ void Client::checkWorkspacePosition() { if( isDesktop()) { + if (geometry() == workspace()->clientArea( ScreenArea, this )) + { + return; + } + QRect area = workspace()->clientArea( FullArea, this ); if( geometry() != area ) setGeometry( area ); diff --git a/manage.cpp b/manage.cpp index 0bb627df67..585a4816e4 100644 --- a/manage.cpp +++ b/manage.cpp @@ -33,6 +33,7 @@ along with this program. If not, see . #include "notifications.h" #include +#include #include "rules.h" #include "group.h" @@ -235,8 +236,11 @@ bool Client::manage( Window w, bool isMapped ) if ( isDesktop() ) { // desktops are treated slightly special - geom = workspace()->clientArea( FullArea, geom.center(), desktop()); - placementDone = true; + if (geom != workspace()->clientArea( ScreenArea, geom.center(), desktop())) + { + geom = workspace()->clientArea( FullArea, geom.center(), desktop()); + placementDone = true; + } } bool usePosition = false;