From 85e2542930052436500e0c4754b0f085ae42e5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 23 Aug 2006 20:11:36 +0000 Subject: [PATCH] Shouldn't try to move windows to top that aren't yet in the workspace (a.k.a. floating windows) in SetWorkspace(). This fixes bug #211. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18591 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Desktop.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index c697aafc98..855865ec83 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -741,11 +741,11 @@ Desktop::SetWorkspace(int32 index) RGBColor previousColor = fWorkspaces[fCurrentWorkspace].Color(); if (fMouseEventWindow != NULL) { - if (!fMouseEventWindow->InWorkspace(index)) { - // the window currently being dragged will follow us to this workspace - // if it's not already on it - if (fMouseEventWindow->IsNormal()) { - // but only normal windows are following + if (fMouseEventWindow->IsNormal()) { + if (!fMouseEventWindow->InWorkspace(index)) { + // The window currently being dragged will follow us to this + // workspace if it's not already on it. + // But only normal windows are following uint32 oldWorkspaces = fMouseEventWindow->Workspaces(); _Windows(index).AddWindow(fMouseEventWindow); @@ -754,12 +754,12 @@ Desktop::SetWorkspace(int32 index) // send B_WORKSPACES_CHANGED message fMouseEventWindow->WorkspacesChanged(oldWorkspaces, fMouseEventWindow->Workspaces()); + } else { + // make sure it's frontmost + _Windows(index).RemoveWindow(fMouseEventWindow); + _Windows(index).AddWindow(fMouseEventWindow, + fMouseEventWindow->Frontmost(_Windows(index).FirstWindow(), index)); } - } else { - // make sure it's frontmost - _Windows(index).RemoveWindow(fMouseEventWindow); - _Windows(index).AddWindow(fMouseEventWindow, - fMouseEventWindow->Frontmost(_Windows(index).FirstWindow(), index)); } fMouseEventWindow->Anchor(index).position = fMouseEventWindow->Frame().LeftTop();