Commit 1cec4446c1cd7f707e42bee1368416717f062218 Parent: fbd8d7e039fd0f72d605950aa317742b1cf89bad Author: mcol <mcol@posteo.net> Date: 2020-11-22 17:53:33 +0000 Committer: mcol <mcol@posteo.net> Committed: 2020-11-22 17:53:33 +0000 add reverse_scrolling option
src/types.h Modified
@@ -57,6 +57,7 @@ struct wl_list mouse_bindings; action on_mouse_motion; action on_mouse_scroll; + bool reverse_scrolling; enum cursor_mode cursor_mode; struct view *grabbed_view; double grab_x, grab_y;
src/input.c Modified
@@ -182,9 +182,9 @@ .dy = 0, }; if (event->orientation == WLR_AXIS_ORIENTATION_VERTICAL) { - motion.dy = event->delta; + motion.dy = server->reverse_scrolling ? event->delta : - event->delta; } else { - motion.dx = event->delta; + motion.dx = server->reverse_scrolling ? event->delta : - event->delta; }; server->on_mouse_scroll(server, &motion); }
src/config.c Modified
@@ -215,14 +215,15 @@ add_desk(server); server->current_desk = wl_container_of(server->desks.next, server->current_desk, link); - server->zoom_min = 0.5; - server->zoom_max = 3; server->mod = WLR_MODIFIER_LOGO; wl_list_init(&server->key_bindings); wl_list_init(&server->mouse_bindings); server->on_mouse_motion = NULL; server->on_mouse_scroll = NULL; + server->zoom_min = 0.5; + server->zoom_max = 3; + server->reverse_scrolling = false; }
readme.rst Modified
@@ -17,7 +17,6 @@ - xwayland - xdg-decoration protocol - primary-selection protocol - - configurable keybindings - functions to shift focus - functions to shift desk view - screenshots protocol
deskwm.conf Modified
@@ -43,6 +43,8 @@ bind scroll pan_desk bind Shift scroll zoom_desk +# Scroll direction. Can be one of: natural, reverse +#scroll_direction natural ## Configure desks