Be a good boy and follow through with the new feature of server side window
shortcuts so that the second mouse button sends windows to the back... :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5d224e740d
commit
0f8d2b68cf
@ -772,9 +772,14 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||
// clicking Window visible area
|
||||
|
||||
click_type action = DEC_DRAG;
|
||||
int32 buttons = _ExtractButtons(message);
|
||||
|
||||
if (inBorderRegion && fDecorator != NULL)
|
||||
action = _ActionFor(message, modifiers);
|
||||
action = _ActionFor(message, buttons, modifiers);
|
||||
else {
|
||||
if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0)
|
||||
action = DEC_MOVETOBACK;
|
||||
}
|
||||
|
||||
// ignore clicks on decorator buttons if the
|
||||
// non-floating window doesn't have focus
|
||||
@ -2066,6 +2071,16 @@ Window::_UpdateContentRegion()
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
Window::_ExtractButtons(const BMessage* message) const
|
||||
{
|
||||
int32 buttons;
|
||||
if (message->FindInt32("buttons", &buttons) != B_OK)
|
||||
buttons = 0;
|
||||
return buttons;
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
Window::_ExtractModifiers(const BMessage* message) const
|
||||
{
|
||||
@ -2082,13 +2097,15 @@ Window::_ActionFor(const BMessage* message) const
|
||||
if (fDecorator == NULL)
|
||||
return DEC_NONE;
|
||||
|
||||
int32 buttons = _ExtractButtons(message);
|
||||
int32 modifiers = _ExtractModifiers(message);
|
||||
return _ActionFor(message, modifiers);
|
||||
return _ActionFor(message, buttons, modifiers);
|
||||
}
|
||||
|
||||
|
||||
click_type
|
||||
Window::_ActionFor(const BMessage* message, int32 modifiers) const
|
||||
Window::_ActionFor(const BMessage* message, int32 buttons,
|
||||
int32 modifiers) const
|
||||
{
|
||||
if (fDecorator == NULL)
|
||||
return DEC_NONE;
|
||||
@ -2097,10 +2114,6 @@ Window::_ActionFor(const BMessage* message, int32 modifiers) const
|
||||
if (message->FindPoint("where", &where) != B_OK)
|
||||
return DEC_NONE;
|
||||
|
||||
int32 buttons;
|
||||
if (message->FindInt32("buttons", &buttons) != B_OK)
|
||||
buttons = 0;
|
||||
|
||||
return fDecorator->Clicked(where, buttons, modifiers);
|
||||
}
|
||||
|
||||
|
@ -256,11 +256,13 @@ protected:
|
||||
|
||||
void _UpdateContentRegion();
|
||||
|
||||
int32 _ExtractButtons(
|
||||
const BMessage* message) const;
|
||||
int32 _ExtractModifiers(
|
||||
const BMessage* message) const;
|
||||
click_type _ActionFor(const BMessage* message) const;
|
||||
click_type _ActionFor(const BMessage* message,
|
||||
int32 modifiers) const;
|
||||
int32 buttons, int32 modifiers) const;
|
||||
|
||||
void _ObeySizeLimits();
|
||||
void _PropagatePosition();
|
||||
|
Loading…
Reference in New Issue
Block a user