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,10 +1117,20 @@ Desktop::ActivateWindow(WindowLayer* window)
|
||||
return;
|
||||
|
||||
if (window == FrontWindow()) {
|
||||
SetFocusWindow(window);
|
||||
// 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);
|
||||
}
|
||||
|
||||
UnlockAllWindows();
|
||||
return;
|
||||
if (avoidsFront == NULL) {
|
||||
// we're already the frontmost window, we might just not have focus yet
|
||||
SetFocusWindow(window);
|
||||
|
||||
UnlockAllWindows();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// we don't need to redraw what is currently
|
||||
|
Loading…
Reference in New Issue
Block a user