As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into

the app_server (and updated all comments that said otherwise).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19865 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-01-19 16:41:58 +00:00
parent 2740b98d3e
commit e30afed439
4 changed files with 15 additions and 14 deletions

View File

@ -1736,7 +1736,8 @@ BRoster::_ApplicationCrashed(team_id team)
/*!
Tells the registrar which application is currently active.
It's called from within BWindow on B_WINDOW_ACTIVATED messages.
It's called from within the app_server when the active application is
changed.
*/
status_t
BRoster::_UpdateActiveApp(team_id team) const

View File

@ -29,7 +29,6 @@
#include <MenuPrivate.h>
#include <MessagePrivate.h>
#include <PortLink.h>
#include <RosterPrivate.h>
#include <ServerProtocol.h>
#include <TokenSpace.h>
#include <tracker_private.h>
@ -906,11 +905,6 @@ 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);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2006, Haiku.
* Copyright 2001-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -41,6 +41,12 @@
#include "SystemPalette.h"
#include "WindowLayer.h"
#include <FontPrivate.h>
#include <MessengerPrivate.h>
#include <RosterPrivate.h>
#include <ServerProtocol.h>
#include <WindowPrivate.h>
#include <AppDefs.h>
#include <Autolock.h>
#include <List.h>
@ -48,11 +54,6 @@
#include <Shape.h>
#include <String.h>
#include <FontPrivate.h>
#include <MessengerPrivate.h>
#include <ServerProtocol.h>
#include <WindowPrivate.h>
#include <new>
#include <stdio.h>
#include <string.h>
@ -298,6 +299,10 @@ ServerApp::Activate(bool value)
fIsActive = value;
if (fIsActive) {
// notify registrar about the active app
BRoster::Private roster;
roster.UpdateActiveApp(ClientTeam());
if (_HasWindowUnderMouse()) {
// Set the cursor to the application cursor, if any
fDesktop->SetCursor(CurrentCursor());

View File

@ -721,7 +721,8 @@ TRoster::HandleGetAppList(BMessage *request)
/*! \brief Handles a _UpdateActiveApp() request.
This is sent from a BWindow when it receives a B_WINDOW_ACTIVATED message.
This is sent from the app_server when the current active application
is changed.
\param request The request message
*/