Skip to content

Commit

Permalink
Add mouse shortcut to expand settings panel
Browse files Browse the repository at this point in the history
Double-click on extra mouse button to open the settings panel (a
single-click opens the notification panel).

This is consistent with the keyboard shortcut MOD+n+n.

PR #2264 <#2264>

Signed-off-by: Romain Vimont <[email protected]>
  • Loading branch information
brunoais authored and rom1v committed Apr 20, 2021
1 parent 70f7e07 commit aafedb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,11 @@ input_manager_process_mouse_button(struct input_manager *im,
return;
}
if (control && event->button == SDL_BUTTON_X2 && down) {
expand_notification_panel(im->controller);
if (event->clicks < 2) {
expand_notification_panel(im->controller);
} else {
expand_settings_panel(im->controller);
}
return;
}
if (control && event->button == SDL_BUTTON_RIGHT) {
Expand Down

0 comments on commit aafedb0

Please sign in to comment.