diff --git a/useractions.cpp b/useractions.cpp index 67e726ae8e..7ccdbddaf3 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -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()); }