workspaces: switch current workspace on mouse wheel

Gnome does that on the panel widget, at first it was annoying
but after a while it feels quite handy.
This commit is contained in:
François Revol
2013-12-30 19:13:30 +01:00
parent fbe8c1ce60
commit a82d922deb
+10
View File
@@ -505,6 +505,16 @@ WorkspacesView::MessageReceived(BMessage* message)
_AboutRequested();
break;
case B_MOUSE_WHEEL_CHANGED:
{
float dy = message->FindFloat("be:wheel_delta_y");
if (dy > 0.1)
activate_workspace(current_workspace() + 1);
if (dy < -0.1)
activate_workspace(current_workspace() - 1);
break;
}
case kMsgChangeCount:
be_roster->Launch(kScreenPrefletSignature);
break;