B_AVOID_FRONT window were ignored when activating a window, and thus, menus could
steal the focus of the focus window. This fixes bug #181. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
db937cbed9
commit
da0f53d8e4
@ -1117,11 +1117,21 @@ Desktop::ActivateWindow(WindowLayer* window)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (window == FrontWindow()) {
|
if (window == FrontWindow()) {
|
||||||
|
// see if there is a normal B_AVOID_FRONT window still in front of us
|
||||||
|
WindowLayer* avoidsFront = window->NextWindow(fCurrentWorkspace);
|
||||||
|
while (avoidsFront && avoidsFront->IsNormal()
|
||||||
|
&& (avoidsFront->Flags() & B_AVOID_FRONT) == 0) {
|
||||||
|
avoidsFront = avoidsFront->NextWindow(fCurrentWorkspace);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avoidsFront == NULL) {
|
||||||
|
// we're already the frontmost window, we might just not have focus yet
|
||||||
SetFocusWindow(window);
|
SetFocusWindow(window);
|
||||||
|
|
||||||
UnlockAllWindows();
|
UnlockAllWindows();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// we don't need to redraw what is currently
|
// we don't need to redraw what is currently
|
||||||
// visible of the window
|
// visible of the window
|
||||||
|
Loading…
Reference in New Issue
Block a user