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
This commit is contained in:
parent
20d4ee1d59
commit
85e2542930
@ -741,11 +741,11 @@ Desktop::SetWorkspace(int32 index)
|
|||||||
RGBColor previousColor = fWorkspaces[fCurrentWorkspace].Color();
|
RGBColor previousColor = fWorkspaces[fCurrentWorkspace].Color();
|
||||||
|
|
||||||
if (fMouseEventWindow != NULL) {
|
if (fMouseEventWindow != NULL) {
|
||||||
if (!fMouseEventWindow->InWorkspace(index)) {
|
if (fMouseEventWindow->IsNormal()) {
|
||||||
// the window currently being dragged will follow us to this workspace
|
if (!fMouseEventWindow->InWorkspace(index)) {
|
||||||
// if it's not already on it
|
// The window currently being dragged will follow us to this
|
||||||
if (fMouseEventWindow->IsNormal()) {
|
// workspace if it's not already on it.
|
||||||
// but only normal windows are following
|
// But only normal windows are following
|
||||||
uint32 oldWorkspaces = fMouseEventWindow->Workspaces();
|
uint32 oldWorkspaces = fMouseEventWindow->Workspaces();
|
||||||
|
|
||||||
_Windows(index).AddWindow(fMouseEventWindow);
|
_Windows(index).AddWindow(fMouseEventWindow);
|
||||||
@ -754,12 +754,12 @@ Desktop::SetWorkspace(int32 index)
|
|||||||
// send B_WORKSPACES_CHANGED message
|
// send B_WORKSPACES_CHANGED message
|
||||||
fMouseEventWindow->WorkspacesChanged(oldWorkspaces,
|
fMouseEventWindow->WorkspacesChanged(oldWorkspaces,
|
||||||
fMouseEventWindow->Workspaces());
|
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();
|
fMouseEventWindow->Anchor(index).position = fMouseEventWindow->Frame().LeftTop();
|
||||||
|
Loading…
Reference in New Issue
Block a user