Desktop::SendBehindWindow() now checks if the window is on the current

workspace, and do nothing if not. This fixes bug #442.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-04-16 13:49:41 +00:00
parent 6aa4743b51
commit 6e69baffb1
+6 -1
View File
@@ -1261,7 +1261,12 @@ Desktop::ActivateWindow(WindowLayer* window)
void void
Desktop::SendWindowBehind(WindowLayer* window, WindowLayer* behindOf) Desktop::SendWindowBehind(WindowLayer* window, WindowLayer* behindOf)
{ {
if (window == BackWindow() || !LockAllWindows()) // TODO: should the "not in current workspace" be handled anyway?
// (the code below would have to be changed then, though)
if (window == BackWindow()
|| !window->InWorkspace(fCurrentWorkspace)
|| (behindOf != NULL && !behindOf->InWorkspace(fCurrentWorkspace))
|| !LockAllWindows())
return; return;
// Is this a valid behindOf window? // Is this a valid behindOf window?