diff --git a/geometry.cpp b/geometry.cpp index 298200c67e..ff9b04ee9e 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2860,11 +2860,6 @@ 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; - // When doing a restricted move we must always keep 100px of the titlebar // visible to allow the user to be able to move it again. int frameLeft, frameRight, frameTop, frameBottom; diff --git a/toplevel.cpp b/toplevel.cpp index 9068835bbc..ebe9242a16 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -344,9 +344,10 @@ int Toplevel::screen() const return 0; int s = workspace()->screenNumber( geometry().center()); if( s < 0 ) - // Center of the window is offscreen, just use the active one as if this window is the - // one with input focus then activeScreen() will return the screen it used to be on. - return workspace()->activeScreen( false ); + { + kDebug(1212) << "Invalid screen: Center" << geometry().center() << ", screen" << s; + return 0; + } return s; } diff --git a/workspace.cpp b/workspace.cpp index 87ec0fa43b..723ab29bc6 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1550,14 +1550,13 @@ int Workspace::activeScreen( bool checkClient ) const { if( !options->xineramaEnabled ) return 0; - int screen = -1; - if( options->activeMouseScreen ) - screen = Kephal::ScreenUtils::screenId( cursorPos()); - if( screen != -1 ) - return screen; - if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen ) && checkClient ) - return activeClient()->screen(); - return active_screen; + if( !options->activeMouseScreen ) + { + if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen )) + return activeClient()->screen(); + return active_screen; + } + return Kephal::ScreenUtils::screenId( cursorPos()); } /**