1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:17:35 +00:00

MouseSettings: Add option to reverse buttons

Add option to reverse primary and secondary buttons in Mouse Settings.
- WindowServer.ini: add default entry
- switch-mouse-buttons.png: new icon for settings entry
- Mouse.gml/MouseWidget.*: new settings dialog
- ClientConnection/WindowManager/Server: window message for settings
- EventLoop.cpp: swap buttons 1 and 2 if settings are on
This commit is contained in:
Andrew Pardoe 2021-10-24 19:47:33 -07:00 committed by Idan Horowitz
parent 5599d22744
commit 0e68550c05
11 changed files with 90 additions and 0 deletions

View file

@ -164,6 +164,8 @@ public:
void set_scroll_step_size(unsigned);
void set_double_click_speed(int);
int double_click_speed() const;
void set_buttons_switched(bool);
bool get_buttons_switched() const;
Window* set_active_input_window(Window*);
void restore_active_input_window(Window*);
@ -409,6 +411,7 @@ private:
int m_double_click_speed { 0 };
int m_max_distance_for_double_click { 4 };
bool m_previous_event_was_super_keydown { false };
bool m_buttons_switched { false };
WeakPtr<Window> m_hovered_window;
WeakPtr<Window> m_highlight_window;