Ensure that Workspace::activeScreen() always returns a valid screen.
svn path=/trunk/KDE/kdebase/workspace/; revision=925358
This commit is contained in:
parent
1802e56d9b
commit
7af22d3d99
1 changed files with 8 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue