From beee5a8f8584a7413c29fee9e3775984af96fe91 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Fri, 13 Feb 2009 06:15:59 +0000 Subject: [PATCH] If the cursor goes into the "dead" area of a Xinerama screen where the two monitors have different resolutions treat it as if the cursor didn't move at all when attempting to move a window. Prevents KWin from crashing when in this situation. svn path=/trunk/KDE/kdebase/workspace/; revision=925355 --- geometry.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/geometry.cpp b/geometry.cpp index a03f9e559b..2ffd45ac16 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2711,6 +2711,11 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root ) // TODO move whole group when moving its leader or when the leader is not mapped? + // If the cursor goes into the "dead" area of a Xinerama screen where the two monitors + // have different resolutions treat it as if the cursor didn't move at all. + if( workspace()->screenNumber( globalPos ) == -1 ) + return; + // compute bounds // NOTE: This is duped in checkUnrestrictedMoveResize(). QRect desktopArea = workspace()->clientArea( WorkArea, globalPos, desktop());