Prevent recursion loop in Toplevel::screen() and
Workspace::activeScreen() when the center of the active client is offscreen and was not previously on the active screen. svn path=/trunk/KDE/kdebase/workspace/; revision=925362
This commit is contained in:
parent
7af22d3d99
commit
b55115a8be
3 changed files with 4 additions and 4 deletions
|
@ -346,7 +346,7 @@ int Toplevel::screen() const
|
|||
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();
|
||||
return workspace()->activeScreen( false );
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -1661,7 +1661,7 @@ int Workspace::numScreens() const
|
|||
return Kephal::ScreenUtils::numScreens();
|
||||
}
|
||||
|
||||
int Workspace::activeScreen() const
|
||||
int Workspace::activeScreen( bool checkClient ) const
|
||||
{
|
||||
if( !options->xineramaEnabled )
|
||||
return 0;
|
||||
|
@ -1670,7 +1670,7 @@ int Workspace::activeScreen() const
|
|||
screen = Kephal::ScreenUtils::screenId( cursorPos());
|
||||
if( screen != -1 )
|
||||
return screen;
|
||||
if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen ))
|
||||
if( activeClient() != NULL && !activeClient()->isOnScreen( active_screen ) && checkClient )
|
||||
return activeClient()->screen();
|
||||
return active_screen;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
int desktopUp( int desktop, bool wrap ) const;
|
||||
int desktopDown( int desktop, bool wrap ) const;
|
||||
|
||||
int activeScreen() const;
|
||||
int activeScreen( bool checkClient = true ) const;
|
||||
int numScreens() const;
|
||||
void checkActiveScreen( const Client* c );
|
||||
void setActiveScreenMouse( const QPoint& mousepos );
|
||||
|
|
Loading…
Reference in a new issue