Fix regression of setting a window to all desktops

The logic to prevent errornous desktops broke setting a window
to all desktops through the task manager. For some reason all
desktops is -1 which is of course less than 1 ;-)
This commit is contained in:
Martin Gräßlin 2011-05-27 16:47:45 +02:00
parent 69d944e64a
commit 20941aca53

View file

@ -1683,7 +1683,7 @@ void Workspace::setNumberOfDesktops(int n)
*/
void Workspace::sendClientToDesktop(Client* c, int desk, bool dont_activate)
{
if (desk < 1 || desk > numberOfDesktops())
if ((desk < 1 && desk != NET::OnAllDesktops) || desk > numberOfDesktops())
return;
int old_desktop = c->desktop();
bool was_on_desktop = c->isOnDesktop(desk) || c->isOnAllDesktops();