From ec3fd1713a48109bbc977cfc3addcc5f5ddf69d3 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 5 May 2012 15:32:59 -0400 Subject: [PATCH] Fix regressions introduced by previous commit. - Conditionally enable and disable event masks as needed when we detect the mouse entering/exiting the deskbar area. This is necessary because otherwise the app_server appears to eat mouse messages due to the ctrl+cmd+ resize shortcut. Also change some conditionals slightly to better deal with differing combinations of autohide and/or autoraise. --- src/apps/deskbar/BarView.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index 823860dbdb..dfdfc9e38e 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -250,11 +250,19 @@ TBarView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) bool autoRaise = settings->autoRaise; bool autoHide = settings->autoHide; - if (!autoRaise && !autoHide) + if (DragRegion()->IsDragging()) { + DragRegion()->MouseMoved(where, transit, dragMessage); return; + } - if (DragRegion()->IsDragging()) + if (transit == B_ENTERED_VIEW && EventMask() == 0) + SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY); + + if (!autoRaise && !autoHide) { + if (transit == B_EXITED_VIEW || transit == B_OUTSIDE_VIEW) + SetEventMask(0); return; + } bool isTopMost = Window()->Feel() == B_FLOATING_ALL_WINDOW_FEEL; @@ -266,13 +274,12 @@ TBarView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) && Window()->Frame().Contains(where)) { // cursor is on a screen edge within the window frame - if (!alwaysOnTop && autoRaise && !isTopMost) { + if (!alwaysOnTop && autoRaise && !isTopMost) RaiseDeskbar(true); - SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY); - } if (autoHide && IsHidden()) HideDeskbar(false); + } else { TBarWindow* window = (TBarWindow*)Window(); if (window->IsShowingMenu())