[haiku-development] quit/kill Team Monitor

  • From: Giovanni Mugnai <musical777@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 8 May 2013 14:52:26 +0200

Hi,
in these days i've recompiled "Lock Workstation": an app which
provides a login mask to lock Haiku boxes with a password (and i've
also made a modern login mask, only using the  magnificient
WonderBrush) :-)
Screenshot: http://s22.postimg.org/42zuiooy9/Lock_Workstation_Haiku.jpg

For security reason, when LockWorkstation is activated, mouse click is
disabled and also Team Monitor *should* be disabled, but CTRL ALT CANC
when LockWorkstation is activate, will bring Team Monitor window, with
the ability to kill (and so bypass) the login mask.

This is the part of code which should skip/quit Team Monitor:

BString strSignature;
message->FindString("be:signature", &strSignature);
if (strSignature.ICompare ("application/x-vnd.Be-input_server") == 0)
{
app_info info;
be_roster->GetAppInfo (strSignature.String(), &info);
BMessage msgGetProperty, msgSetProperty, msgReply;
status_t result;
msgGetProperty.what = B_GET_PROPERTY;
msgGetProperty.AddSpecifier("Messenger");
msgGetProperty.AddSpecifier("Window", "Team Monitor");
result = BMessenger(info.signature,
info.team).SendMessage(&msgGetProperty, &msgReply);
if (result == B_OK)
{
BMessenger msng;
if (msgReply.FindMessenger("result", &msng) == B_OK)
{
msng.SendMessage(QUIT_TEAM_MONITOR);
app_info mwinfo;
be_app->GetAppInfo(&mwinfo);
be_roster->ActivateApp(mwinfo.team);
Activate(true);
}
}
}
break;
}
default:
BWindow::MessageReceived(message);
break;
}
}

/**********************************************************/
bool mWindow::QuitRequested()
{
be_app->PostMessage(B_QUIT_REQUESTED);
return BWindow::QuitRequested();
}

But as i've said doesn't work. How should i change this part of code
to quit/kill Team Monitor on CTRL ALT CANC event when LockWorkstation
is active?

Thank you.

--
Giovanni.

Other related posts: