stack&tile: don't allow stacking a window onto itself

Change-Id: Iefd4a49b5b4caf2c3cd478a77fe4673dcac40427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5056
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Adrien Destugues
2022-04-01 09:39:23 +00:00
committed by Adrien Destugues
parent a12cf089ee
commit 83cb10bcbc
@@ -69,6 +69,14 @@ StackingEventHandler::HandleMessage(SATWindow* sender,
SATWindow* candidate = stackAndTile->GetSATWindow(window);
if (!candidate)
return false;
// Is that window already part of the stack?
if (area->WindowList().HasItem(candidate)) {
reply.StartMessage(B_MISMATCHED_VALUES);
reply.Flush();
break;
}
if (!parent->StackWindow(candidate))
return false;