From 2ff74f83bed5e161ce650f4c120532590c46afd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 10 Dec 2011 14:43:58 +0100 Subject: [PATCH] Obey forced desktop id on electricborder change BUG: 95627 REVIEW: 103376 --- screenedge.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screenedge.cpp b/screenedge.cpp index 1dc85a80ea..9734a1e624 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . // KWin #include "atoms.h" +#include "client.h" #include "effects.h" #include "options.h" #include "utils.h" @@ -323,6 +324,9 @@ void ScreenEdge::switchDesktop(ElectricBorder border, const QPoint& _pos) desk = Workspace::self()->desktopBelow(desk, options->rollOverDesktops); pos.setY(OFFSET); } + Client *c = Workspace::self()->getMovingClient(); + if (c && c->rules()->checkDesktop(desk) != desk) + return; // user attempts to move a client to another desktop where it is ruleforced to not be int desk_before = Workspace::self()->currentDesktop(); Workspace::self()->setCurrentDesktop(desk); if (Workspace::self()->currentDesktop() != desk_before)