BWindow::IsFront() was implemented incorrectly - we actually need to query the

app_server for this; added a new AS_IS_FRONT_WINDOW command for this.
For example, clicking on the menu bar to bring windows to front in FFM mode
does work now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19725 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-01-06 17:08:19 +00:00
parent f0d2e76081
commit ccf137b886
3 changed files with 20 additions and 4 deletions
+12 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2006, Haiku.
* Copyright 2001-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -647,7 +647,17 @@ BWindow::EndViewTransaction()
bool
BWindow::IsFront() const
{
return (IsActive() || IsModal());
BAutolock locker(const_cast<BWindow*>(this));
if (!locker.IsLocked())
return false;
fLink->StartMessage(AS_IS_FRONT_WINDOW);
status_t status;
if (fLink->FlushWithReply(status) == B_OK)
return status >= B_OK;
return false;
}