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:
Axel Dörfler
2007-01-18 17:45:08 +00:00
parent badbad99a9
commit c2f641f2e5
8 changed files with 121 additions and 104 deletions
+12 -27
View File
@@ -1,35 +1,20 @@
//------------------------------------------------------------------------------
// Copyright (c) 2001-2002, OpenBeOS
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: RegistrarDefs.h
// Author(s): Ingo Weinhold ([email protected])
// Description: API classes - registrar interface.
//------------------------------------------------------------------------------
/*
* Copyright 2001-2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold, [email protected]
*/
#ifndef REGISTRAR_DEFS_H
#define REGISTRAR_DEFS_H
//! API classes - registrar interface.
#include <Errors.h>
#include <Roster.h>
namespace BPrivate {
// names
@@ -62,7 +47,7 @@ enum {
B_REG_SET_SIGNATURE = 'rgss',
B_REG_GET_APP_INFO = 'rgai',
B_REG_GET_APP_LIST = 'rgal',
B_REG_ACTIVATE_APP = 'rgac',
B_REG_UPDATE_ACTIVE_APP = 'rgua',
B_REG_BROADCAST = 'rgbc',
B_REG_START_WATCHING = 'rgwa',
B_REG_STOP_WATCHING = 'rgsw',
+4 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2006, Haiku.
* Copyright 2001-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -75,6 +75,9 @@ class BRoster::Private {
void ApplicationCrashed(team_id team) const
{ fRoster->_ApplicationCrashed(team); }
void UpdateActiveApp(team_id team) const
{ fRoster->_UpdateActiveApp(team); }
static void InitBeRoster();
static void DeleteBeRoster();