block screenswitch if active screen follows mouse
also inform the user about this BUG: 183410 FIXED-IN: 4.11 REVIEW: 109678
This commit is contained in:
parent
29e5023cfb
commit
f00ec6ccd5
1 changed files with 15 additions and 0 deletions
|
@ -1292,8 +1292,21 @@ void Workspace::slotWindowToDesktop()
|
|||
}
|
||||
}
|
||||
|
||||
static bool screenSwitchImpossible()
|
||||
{
|
||||
if (!options->isActiveMouseScreen())
|
||||
return false;
|
||||
QStringList args;
|
||||
args << "--passivepopup" << i18n("The window manager is confgured to consider the screen with the mouse on it as active one.\n"
|
||||
"Therefore it is not possible to switch to a screen explicitly.") << "20";
|
||||
KProcess::startDetached("kdialog", args);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Workspace::slotSwitchToScreen()
|
||||
{
|
||||
if (screenSwitchImpossible())
|
||||
return;
|
||||
const int i = senderValue(sender());
|
||||
if (i > -1)
|
||||
setCurrentScreen(i);
|
||||
|
@ -1301,6 +1314,8 @@ void Workspace::slotSwitchToScreen()
|
|||
|
||||
void Workspace::slotSwitchToNextScreen()
|
||||
{
|
||||
if (screenSwitchImpossible())
|
||||
return;
|
||||
setCurrentScreen((activeScreen() + 1) % numScreens());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue