* Window::MouseDown() no longer eats the click if the window modifiers were
pressed even if there is nothing to do. This allows the Deskbar to be moved with the window modifier keys held, finally, see #6029. * Removed a superfluous (fDecorator != NULL) from the check to choose between decorator and window modifier action - _ActionFor() can safely be called with a NULL decorator, and it just made the logic look wrong (even though no harm was done). * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36935 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ea021b94d8
commit
2fc6f37e88
@ -792,25 +792,30 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||
bool windowModifier = (fFlags & B_NO_SERVER_SIDE_WINDOW_MODIFIERS) == 0
|
||||
&& (modifiers & (B_COMMAND_KEY | B_CONTROL_KEY | B_OPTION_KEY
|
||||
| B_SHIFT_KEY)) == (B_COMMAND_KEY | B_CONTROL_KEY);
|
||||
click_type action = CLICK_NONE;
|
||||
|
||||
// default action is to drag the Window
|
||||
if (windowModifier || inBorderRegion) {
|
||||
// clicking Window visible area
|
||||
|
||||
click_type action = CLICK_NONE;
|
||||
int32 buttons = _ExtractButtons(message);
|
||||
|
||||
if (inBorderRegion && fDecorator != NULL)
|
||||
if (inBorderRegion)
|
||||
action = _ActionFor(message, buttons, modifiers);
|
||||
else {
|
||||
if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0)
|
||||
action = CLICK_MOVE_TO_BACK;
|
||||
else if ((fFlags & B_NOT_MOVABLE) == 0 && fDecorator != NULL)
|
||||
action = CLICK_DRAG;
|
||||
else {
|
||||
// pass click on to the application
|
||||
windowModifier = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (windowModifier || inBorderRegion) {
|
||||
if (!desktopSettings.AcceptFirstClick()) {
|
||||
// ignore clicks on decorator buttons if the
|
||||
// Ignore clicks on decorator buttons if the
|
||||
// non-floating window doesn't have focus
|
||||
if (!IsFocus() && !IsFloating() && action != CLICK_MOVE_TO_BACK
|
||||
&& action != CLICK_RESIZE && action != CLICK_SLIDE_TAB)
|
||||
@ -868,13 +873,12 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||
engine->LockParallelAccess();
|
||||
engine->ConstrainClippingRegion(visibleBorder);
|
||||
|
||||
if (fIsZooming) {
|
||||
if (fIsZooming)
|
||||
fDecorator->SetZoom(true);
|
||||
} else if (fIsClosing) {
|
||||
else if (fIsClosing)
|
||||
fDecorator->SetClose(true);
|
||||
} else if (fIsMinimizing) {
|
||||
else if (fIsMinimizing)
|
||||
fDecorator->SetMinimize(true);
|
||||
}
|
||||
|
||||
engine->UnlockParallelAccess();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user