* Don't use the B_MINIMIZE message for the minimize shortcut (ctrl-alt-m), since

that ignores the B_NOT_MINIMIZABLE flag. Instead, there is now a private
  _MINIMIZE_ message (naming like those other ugly private BMessage constants in
  AppDefs.h) which honours that flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31799 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-07-27 11:27:45 +00:00
parent 72f5ac30df
commit 6d52606f4b
1 changed files with 20 additions and 5 deletions

View File

@ -61,6 +61,9 @@
// if we ever move this to a public namespace, we should also move the
// handling of this message into BApplication
#define _MINIMIZE_ '_WMZ'
void do_minimize_team(BRect zoomRect, team_id team, bool zoom);
@ -289,7 +292,8 @@ BWindow::Shortcut::PrepareKey(uint32 key)
BWindow::BWindow(BRect frame, const char* title, window_type type,
uint32 flags, uint32 workspace)
: BLooper(title, B_DISPLAY_PRIORITY)
:
BLooper(title, B_DISPLAY_PRIORITY)
{
window_look look;
window_feel feel;
@ -301,14 +305,16 @@ BWindow::BWindow(BRect frame, const char* title, window_type type,
BWindow::BWindow(BRect frame, const char* title, window_look look,
window_feel feel, uint32 flags, uint32 workspace)
: BLooper(title, B_DISPLAY_PRIORITY)
:
BLooper(title, B_DISPLAY_PRIORITY)
{
_InitData(frame, title, look, feel, flags, workspace);
}
BWindow::BWindow(BMessage* data)
: BLooper(data)
:
BLooper(data)
{
data->FindRect("_frame", &fFrame);
@ -359,7 +365,8 @@ BWindow::BWindow(BMessage* data)
BWindow::BWindow(BRect frame, int32 bitmapToken)
: BLooper("offscreen bitmap")
:
BLooper("offscreen bitmap")
{
// TODO: Implement for real
_DecomposeType(B_UNTYPED_WINDOW, &fLook, &fFeel);
@ -846,6 +853,14 @@ BWindow::DispatchMessage(BMessage* msg, BHandler* target)
Zoom();
break;
case _MINIMIZE_:
{
// Used by the minimize shortcut
if ((Flags() & B_NOT_MINIMIZABLE) == 0)
Minimize(true);
break;
}
case B_MINIMIZE:
{
bool minimize;
@ -2554,7 +2569,7 @@ BWindow::_InitData(BRect frame, const char* title, window_look look,
// Window modifier keys
AddShortcut('M', B_COMMAND_KEY | B_CONTROL_KEY,
new BMessage(B_MINIMIZE), NULL);
new BMessage(_MINIMIZE_), NULL);
AddShortcut('Z', B_COMMAND_KEY | B_CONTROL_KEY,
new BMessage(B_ZOOM), NULL);
AddShortcut('H', B_COMMAND_KEY | B_CONTROL_KEY,