Turns out the whole "active app" mechanism in the registrar wasn't used at all; the
Switcher now works as expected. * Renamed TRoster::ActivateApp() to UpdateActiveApp(), as the app is already activated at that point (the registrar only keeps track of it). * BWindow::DispatchMessage() now calls the new BRoster::Private::UpdateActiveApp() method when it receives a B_WINDOW_ACTIVATED message. * Added BRoster::_UpdateActiveApp() which calls the new B_REG_UPDATE_ACTIVE_APP. * Removed now unused B_REG_ACTIVATE_APP. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19857 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <MenuPrivate.h>
|
||||
#include <MessagePrivate.h>
|
||||
#include <PortLink.h>
|
||||
#include <RosterPrivate.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <TokenSpace.h>
|
||||
#include <tracker_private.h>
|
||||
@@ -905,12 +906,18 @@ FrameMoved(origin);
|
||||
if (msg->FindBool("active", &active) == B_OK
|
||||
&& active != fActive) {
|
||||
fActive = active;
|
||||
if (active) {
|
||||
// notify registrar about the active app
|
||||
BRoster::Private roster;
|
||||
roster.UpdateActiveApp(be_app->Team());
|
||||
}
|
||||
|
||||
WindowActivated(active);
|
||||
|
||||
|
||||
// call hook function 'WindowActivated(bool)' for all
|
||||
// views attached to this window.
|
||||
fTopView->_Activate(active);
|
||||
|
||||
|
||||
// we notify the input server if we are gaining or losing focus
|
||||
// from a view which has the B_INPUT_METHOD_AWARE on a window
|
||||
// (de)activation
|
||||
|
||||
Reference in New Issue
Block a user