[haiku-commits] haiku: hrev50796 - src/apps/workspaces

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 29 Dec 2016 00:28:13 +0100 (CET)

hrev50796 adds 1 changeset to branch 'master'
old head: e8cfcb1f60586cf3a49211c4f624c0461a591814
new head: 2060602c78f98fc97023c3c84d65e8434c85e0ae
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=2060602c78f9+%5Ee8cfcb1f6058

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

2060602c78f9: Workspaces: Turn off wheel switch for replicant.
  
  * It's turned off by default for the app, so I see no reason why the
    replicant should have it. It's annoying to use, as my touchpad
    obviously scrolls when moving the mouse while having a button pressed.
  * A cleaner solution would be to read the settings once if there is no
    WorkspacesWindow, and use the setting from there instead.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

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

Revision:    hrev50796
Commit:      2060602c78f98fc97023c3c84d65e8434c85e0ae
URL:         http://cgit.haiku-os.org/haiku/commit/?id=2060602c78f9
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Wed Dec 28 23:24:02 2016 UTC

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

1 file changed, 7 insertions(+), 7 deletions(-)
src/apps/workspaces/Workspaces.cpp | 14 +++++++-------

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

diff --git a/src/apps/workspaces/Workspaces.cpp 
b/src/apps/workspaces/Workspaces.cpp
index c171409..0a39e72 100644
--- a/src/apps/workspaces/Workspaces.cpp
+++ b/src/apps/workspaces/Workspaces.cpp
@@ -489,15 +489,15 @@ WorkspacesView::MessageReceived(BMessage* message)
 
                case B_MOUSE_WHEEL_CHANGED:
                {
-                       WorkspacesWindow *window;
-                       window = dynamic_cast<WorkspacesWindow *>(Window());
-                       if (window && !window->SwitchOnWheel())
+                       WorkspacesWindow* window
+                               = dynamic_cast<WorkspacesWindow*>(Window());
+                       if (window == NULL || !window->SwitchOnWheel())
                                break;
 
-                       float dy = message->FindFloat("be:wheel_delta_y");
-                       if (dy > 0.1)
+                       float deltaY = message->FindFloat("be:wheel_delta_y");
+                       if (deltaY > 0.1)
                                activate_workspace(current_workspace() + 1);
-                       else if (dy < -0.1)
+                       else if (deltaY < -0.1)
                                activate_workspace(current_workspace() - 1);
                        break;
                }
@@ -1049,7 +1049,7 @@ WorkspacesApp::ArgvReceived(int32 argc, char **argv)
 BView* instantiate_deskbar_item()
 {
        // Calculate the correct size of the Deskbar replicant first
-       
+
        BScreen screen;
        float screenWidth = screen.Frame().Width();
        float screenHeight = screen.Frame().Height();


Other related posts:

  • » [haiku-commits] haiku: hrev50796 - src/apps/workspaces - axeld