* 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:
@@ -47,6 +47,11 @@
|
|||||||
# define STRACE(x) ;
|
# define STRACE(x) ;
|
||||||
#endif
|
#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 {
|
struct BWindow::unpack_cookie {
|
||||||
unpack_cookie();
|
unpack_cookie();
|
||||||
@@ -686,7 +691,6 @@ BWindow::MessageReceived(BMessage *msg)
|
|||||||
BMessage replyMsg(B_REPLY);
|
BMessage replyMsg(B_REPLY);
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
|
|
||||||
BMessage specifier;
|
BMessage specifier;
|
||||||
int32 what;
|
int32 what;
|
||||||
const char *prop;
|
const char *prop;
|
||||||
@@ -845,6 +849,10 @@ BWindow::DispatchMessage(BMessage *msg, BHandler *target)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case B_HIDE_APPLICATION:
|
||||||
|
do_minimize_team(BRect(), be_app->Team(), false);
|
||||||
|
break;
|
||||||
|
|
||||||
case B_WINDOW_RESIZED:
|
case B_WINDOW_RESIZED:
|
||||||
{
|
{
|
||||||
int32 width, height;
|
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('V', B_COMMAND_KEY, new BMessage(B_PASTE), NULL);
|
||||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_SELECT_ALL), 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
|
// We set the default pulse rate, but we don't start the pulse
|
||||||
fPulseRate = 500000;
|
fPulseRate = 500000;
|
||||||
fPulseRunner = NULL;
|
fPulseRunner = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user