* when the parent ServerApp of the focus window changes,
it's Activate() method is called, if there is no new focus app, the cursor is unhidden for safety. The most notable difference: After having run a screen saver, the cursor will be visible again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -920,15 +920,36 @@ Desktop::SetFocusWindow(WindowLayer* focus)
|
||||
focus = focus->PreviousWindow(fCurrentWorkspace);
|
||||
}
|
||||
|
||||
if (fFocus != NULL)
|
||||
ServerApp* oldActiveApp = NULL;
|
||||
ServerApp* newActiveApp = NULL;
|
||||
|
||||
if (fFocus != NULL) {
|
||||
fFocus->SetFocus(false);
|
||||
oldActiveApp = fFocus->ServerWindow()->App();
|
||||
}
|
||||
|
||||
fFocus = focus;
|
||||
|
||||
if (focus != NULL)
|
||||
focus->SetFocus(true);
|
||||
if (fFocus != NULL) {
|
||||
fFocus->SetFocus(true);
|
||||
newActiveApp = fFocus->ServerWindow()->App();
|
||||
}
|
||||
|
||||
UnlockAllWindows();
|
||||
|
||||
// change the "active" app if appropriate
|
||||
if (oldActiveApp != newActiveApp) {
|
||||
if (oldActiveApp) {
|
||||
oldActiveApp->Activate(false);
|
||||
}
|
||||
|
||||
if (newActiveApp) {
|
||||
newActiveApp->Activate(true);
|
||||
} else {
|
||||
// make sure the cursor is visible
|
||||
HWInterface()->SetCursorVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user