when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no other windows can interfere. * Therefore, it's no longer necessary to have the screen_blanker window use kWindowScreenFeel - it will set its window to full screen as long as the blanker runs. * Added a AS_APP_CRASHED notification in the app_server that will remove all kWindowScreenFeels from the windows of the crashed app. * This is now used by the debugger to ensure that the debugger alert will be visible. * Factored out a DesktopLink class out of the BRoster::_ActivateApp() method. This class is now also used in the new BRoster::_ApplicationCrashed() method as used in the debug_server (via BRoster::Private). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96
60 lines
989 B
C++
60 lines
989 B
C++
/*
|
|
* Copyright 2006, Haiku Inc.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Axel Dörfler, [email protected]
|
|
*/
|
|
|
|
|
|
#include <DesktopLink.h>
|
|
#include <ServerProtocol.h>
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
DesktopLink::DesktopLink()
|
|
:
|
|
fReplyPort(B_ERROR)
|
|
{
|
|
// get the app server port
|
|
port_id port = find_port(SERVER_PORT_NAME);
|
|
if (port < B_OK)
|
|
return;
|
|
|
|
// create a reply port
|
|
fReplyPort = create_port(1, "desktop reply");
|
|
if (fReplyPort < B_OK)
|
|
return;
|
|
|
|
SetTo(port, fReplyPort);
|
|
|
|
// We can't use AppServerLink because be_app may be NULL
|
|
StartMessage(AS_GET_DESKTOP);
|
|
Attach<port_id>(fReplyPort);
|
|
Attach<int32>(getuid());
|
|
|
|
int32 code;
|
|
if (FlushWithReply(code) != B_OK || code != B_OK)
|
|
return;
|
|
|
|
// we now talk to the desktop
|
|
Read<port_id>(&port);
|
|
SetSenderPort(port);
|
|
}
|
|
|
|
|
|
DesktopLink::~DesktopLink()
|
|
{
|
|
delete_port(fReplyPort);
|
|
}
|
|
|
|
|
|
status_t
|
|
DesktopLink::InitCheck() const
|
|
{
|
|
return fReplyPort < B_OK ? fReplyPort : B_OK;
|
|
}
|
|
|
|
} // namespace BPrivate
|