Sending windows into background works now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12070 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-03-27 10:00:37 +00:00
parent 2a0a0e9c0a
commit 9e358400f5
2 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -933,7 +933,7 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
invalidate = ActiveWorkspace()->MoveToBack(target); invalidate = ActiveWorkspace()->MoveToBack(target);
else else
invalidate = ActiveWorkspace()->MoveToFront(target); invalidate = ActiveWorkspace()->MoveToFront(target);
if (invalidate) if (invalidate)
{ {
get_workspace_windows(); get_workspace_windows();
@@ -953,11 +953,11 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
{ {
fResizingWindow = true; fResizingWindow = true;
} }
else if (action != DEC_NONE) else if (action != DEC_NONE && action != DEC_MOVETOBACK)
{ {
target->MouseDown(action); target->MouseDown(action);
} }
else else if (action != DEC_MOVETOBACK)
{ {
// we are inside WinBorder // we are inside WinBorder
+9 -5
View File
@@ -321,9 +321,10 @@ STRACE(("Wks(%ld)::MoveToBack(%s) \n", fID, newLast? newLast->GetName(): "NULL")
if (!newLastItem) if (!newLastItem)
return false; return false;
bool returnValue = false; ListData *previous = newLastItem->upperItem;
bool changeFront = false; bool returnValue = false;
int32 level = newLast->Level(); bool changeFront = false;
int32 level = newLast->Level();
if (level > B_SYSTEM_FIRST) if (level > B_SYSTEM_FIRST)
level = B_SYSTEM_FIRST; level = B_SYSTEM_FIRST;
@@ -355,7 +356,7 @@ STRACE(("Wks(%ld)::MoveToBack(%s) \n", fID, newLast? newLast->GetName(): "NULL")
case B_FLOATING_APP: case B_FLOATING_APP:
case B_FLOATING_ALL: case B_FLOATING_ALL:
{ {
placeToBack(newLastItem); returnValue = placeToBack(newLastItem);
} }
break; break;
case B_MODAL_APP: case B_MODAL_APP:
@@ -452,6 +453,9 @@ STRACE(("Wks(%ld)::MoveToBack(%s) \n", fID, newLast? newLast->GetName(): "NULL")
} }
} }
if (previous == newLastItem->upperItem)
returnValue = false;
// The following applies ONLY to B_NORMAL and B_MODAL_APP windows. // The following applies ONLY to B_NORMAL and B_MODAL_APP windows.
if (changeFront) if (changeFront)
@@ -459,7 +463,7 @@ STRACE(("Wks(%ld)::MoveToBack(%s) \n", fID, newLast? newLast->GetName(): "NULL")
ListData *newFront; ListData *newFront;
newFront = findNextFront(); newFront = findNextFront();
if (newFront) if (newFront)
MoveToFront(newFront->layerPtr); returnValue |= MoveToFront(newFront->layerPtr);
else else
debugger("MoveToBack: can't find new front! We should find one!\n"); debugger("MoveToBack: can't find new front! We should find one!\n");
} }