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:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2006, Haiku.
|
* Copyright 2001-2007, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -92,6 +92,7 @@ enum {
|
|||||||
AS_WINDOW_MOVE,
|
AS_WINDOW_MOVE,
|
||||||
AS_SET_SIZE_LIMITS,
|
AS_SET_SIZE_LIMITS,
|
||||||
AS_ACTIVATE_WINDOW,
|
AS_ACTIVATE_WINDOW,
|
||||||
|
AS_IS_FRONT_WINDOW,
|
||||||
AS_UPDATE_IF_NEEDED,
|
AS_UPDATE_IF_NEEDED,
|
||||||
|
|
||||||
// BPicture definitions
|
// BPicture definitions
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2006, Haiku.
|
* Copyright 2001-2007, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -647,7 +647,17 @@ BWindow::EndViewTransaction()
|
|||||||
bool
|
bool
|
||||||
BWindow::IsFront() const
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2006, Haiku.
|
* Copyright 2001-2007, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -813,6 +813,11 @@ fDesktop->LockSingleWindow();
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
case AS_IS_FRONT_WINDOW:
|
||||||
|
fLink.StartMessage(fDesktop->FrontWindow() == fWindowLayer ? B_OK : B_ERROR);
|
||||||
|
fLink.Flush();
|
||||||
|
break;
|
||||||
|
|
||||||
case AS_GET_WORKSPACES:
|
case AS_GET_WORKSPACES:
|
||||||
{
|
{
|
||||||
STRACE(("ServerWindow %s: Message AS_GET_WORKSPACES\n", Title()));
|
STRACE(("ServerWindow %s: Message AS_GET_WORKSPACES\n", Title()));
|
||||||
|
|||||||
Reference in New Issue
Block a user