diff --git a/workspace.cpp b/workspace.cpp index 20f068ab90..fe07dfbd7a 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1665,13 +1665,14 @@ int Workspace::activeScreen() const { if( !options->xineramaEnabled ) return 0; - if( !options->activeMouseScreen ) - { - if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen )) - return activeClient()->screen(); - return active_screen; - } - return Kephal::ScreenUtils::screenId( cursorPos()); + int screen = -1; + if( options->activeMouseScreen ) + screen = Kephal::ScreenUtils::screenId( cursorPos()); + if( screen != -1 ) + return screen; + if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen )) + return activeClient()->screen(); + return active_screen; } /**