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.
This commit is contained in:
@@ -489,15 +489,15 @@ WorkspacesView::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case B_MOUSE_WHEEL_CHANGED:
|
case B_MOUSE_WHEEL_CHANGED:
|
||||||
{
|
{
|
||||||
WorkspacesWindow *window;
|
WorkspacesWindow* window
|
||||||
window = dynamic_cast<WorkspacesWindow *>(Window());
|
= dynamic_cast<WorkspacesWindow*>(Window());
|
||||||
if (window && !window->SwitchOnWheel())
|
if (window == NULL || !window->SwitchOnWheel())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
float dy = message->FindFloat("be:wheel_delta_y");
|
float deltaY = message->FindFloat("be:wheel_delta_y");
|
||||||
if (dy > 0.1)
|
if (deltaY > 0.1)
|
||||||
activate_workspace(current_workspace() + 1);
|
activate_workspace(current_workspace() + 1);
|
||||||
else if (dy < -0.1)
|
else if (deltaY < -0.1)
|
||||||
activate_workspace(current_workspace() - 1);
|
activate_workspace(current_workspace() - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1049,7 +1049,7 @@ WorkspacesApp::ArgvReceived(int32 argc, char **argv)
|
|||||||
BView* instantiate_deskbar_item()
|
BView* instantiate_deskbar_item()
|
||||||
{
|
{
|
||||||
// Calculate the correct size of the Deskbar replicant first
|
// Calculate the correct size of the Deskbar replicant first
|
||||||
|
|
||||||
BScreen screen;
|
BScreen screen;
|
||||||
float screenWidth = screen.Frame().Width();
|
float screenWidth = screen.Frame().Width();
|
||||||
float screenHeight = screen.Frame().Height();
|
float screenHeight = screen.Frame().Height();
|
||||||
|
|||||||
Reference in New Issue
Block a user