Fix bug #8004
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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user