Dragging the Deskbar with CTRL+ALT+mouse not possible with
Auto-raise and Auto-hide disabled.

The reason this only worked with auto-raise or auto-hide enabled
is because the EventMask on BarView was only set to received mouse
events when those were settings were enabled. Apparently someone
figured this out. So, to fix this bug I set BarView to always
accept mouse events. Doesn't appear to have any obvious negative
consequences. Auto-hide and auto-raise still work.

I also added a comment in BarWindow::MenusBeginning(). It is
setting the EventMask of BarView to 0 and then back again in
TBarWindow::MenusEnded() to get around a bug in BeOS (according
to the comment anyway). I took out those lines and didn't notice
anything different so I assume that whatever the bug was it is
fixed and now and we can take those lines out permenantly.
This commit is contained in:
John Scipione
2012-04-15 03:20:39 -04:00
parent 083776f89f
commit b932a5a45f
3 changed files with 10 additions and 7 deletions
-4
View File
@@ -509,10 +509,6 @@ TBarApp::MessageReceived(BMessage* message)
case kAutoRaise:
fSettings.autoRaise = fSettings.alwaysOnTop ? false :
!fSettings.autoRaise;
fBarWindow->Lock();
fBarView->UpdateEventMask();
fBarWindow->Unlock();
break;
case kAutoHide:
+6 -2
View File
@@ -510,11 +510,15 @@ TBarView::SaveSettings()
void
TBarView::UpdateEventMask()
{
if (((TBarApp*)be_app)->Settings()->autoRaise
|| ((TBarApp*)be_app)->Settings()->autoHide)
SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
#if 0
desk_settings* settings = ((TBarApp*)be_app)->Settings();
if (settings->autoRaise || settings->autoHide)
SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
else
SetEventMask(0);
#endif
}
+4 -1
View File
@@ -142,7 +142,10 @@ TBarWindow::MenusBeginning()
fBarView->SetEventMask(0);
// This works around a BeOS bug - the menu is quit with every
// B_MOUSE_DOWN the window receives...
// B_MOUSE_DOWN the window receives.
//
// Is this bug still here? I commented this line out and didn't
// notice anything different
BWindow::MenusBeginning();
}