[haiku-commits] haiku: hrev44030 - src/apps/deskbar

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 15 Apr 2012 09:33:09 +0200 (CEST)

hrev44030 adds 1 changeset to branch 'master'
old head: 083776f89f9500e9cf056375b25be42d7a8f5f9a
new head: b932a5a45f86add0cdfca66be71bba585b338588

----------------------------------------------------------------------------

b932a5a: 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.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44030
Commit:      b932a5a45f86add0cdfca66be71bba585b338588
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b932a5a
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Sun Apr 15 07:20:39 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8004

----------------------------------------------------------------------------

3 files changed, 10 insertions(+), 7 deletions(-)
src/apps/deskbar/BarApp.cpp    |    4 ----
src/apps/deskbar/BarView.cpp   |    8 ++++++--
src/apps/deskbar/BarWindow.cpp |    5 ++++-

----------------------------------------------------------------------------

diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp
index e6ffbdf..e31c6f1 100644
--- a/src/apps/deskbar/BarApp.cpp
+++ b/src/apps/deskbar/BarApp.cpp
@@ -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:
diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp
index fa7cbb5..2fe13a6 100644
--- a/src/apps/deskbar/BarView.cpp
+++ b/src/apps/deskbar/BarView.cpp
@@ -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
 }
 
 
diff --git a/src/apps/deskbar/BarWindow.cpp b/src/apps/deskbar/BarWindow.cpp
index e60a4de..6a3f611 100644
--- a/src/apps/deskbar/BarWindow.cpp
+++ b/src/apps/deskbar/BarWindow.cpp
@@ -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();
 }


Other related posts:

  • » [haiku-commits] haiku: hrev44030 - src/apps/deskbar - jscipione