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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user