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 <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user