* Added private (as of now) B_HIDE_APPLICATION message that calls
do_minimize_team() (which is what the Deskbar does when you select "Hide All"). * Added keyboard shortcuts to minimize, and zoom a window, and to hide the whole application (Cmd+Ctrl+M/Z/H respectively). The former two are also present in Dano and up. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22302 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
eabbb1b365
commit
229f4986d2
@ -47,6 +47,11 @@
|
||||
# define STRACE(x) ;
|
||||
#endif
|
||||
|
||||
#define B_HIDE_APPLICATION '_AHD'
|
||||
// if we ever move this to a public namespace, we should also move the
|
||||
// handling of this message into BApplication
|
||||
|
||||
void do_minimize_team(BRect zoomRect, team_id team, bool zoom);
|
||||
|
||||
struct BWindow::unpack_cookie {
|
||||
unpack_cookie();
|
||||
@ -686,7 +691,6 @@ BWindow::MessageReceived(BMessage *msg)
|
||||
BMessage replyMsg(B_REPLY);
|
||||
bool handled = false;
|
||||
|
||||
|
||||
BMessage specifier;
|
||||
int32 what;
|
||||
const char *prop;
|
||||
@ -845,6 +849,10 @@ BWindow::DispatchMessage(BMessage *msg, BHandler *target)
|
||||
break;
|
||||
}
|
||||
|
||||
case B_HIDE_APPLICATION:
|
||||
do_minimize_team(BRect(), be_app->Team(), false);
|
||||
break;
|
||||
|
||||
case B_WINDOW_RESIZED:
|
||||
{
|
||||
int32 width, height;
|
||||
@ -2426,6 +2434,14 @@ BWindow::_InitData(BRect frame, const char* title, window_look look,
|
||||
AddShortcut('V', B_COMMAND_KEY, new BMessage(B_PASTE), NULL);
|
||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_SELECT_ALL), NULL);
|
||||
|
||||
// Window modifier keys
|
||||
AddShortcut('M', B_COMMAND_KEY | B_CONTROL_KEY,
|
||||
new BMessage(B_MINIMIZE), NULL);
|
||||
AddShortcut('Z', B_COMMAND_KEY | B_CONTROL_KEY,
|
||||
new BMessage(B_ZOOM), NULL);
|
||||
AddShortcut('H', B_COMMAND_KEY | B_CONTROL_KEY,
|
||||
new BMessage(B_HIDE_APPLICATION), NULL);
|
||||
|
||||
// We set the default pulse rate, but we don't start the pulse
|
||||
fPulseRate = 500000;
|
||||
fPulseRunner = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user