Add configuration option for disabling mouse warping

This patch adds a new configuration option "mouse_warping [output|none]".

When mouse warping is disabled, mouse cursor does not jump to middle of current
screen when changing workspaces between multiple outputs. This introduces a
"special" cursor state, where focus is in one window and cursor on another.
Useful for eg. scrolling a web page with mouse wheel while typing into another
window on keyboard.
This commit is contained in:
Atte Peltomaki
2014-03-24 19:03:05 +02:00
committed by Michael Stapelberg
parent f41e81bd96
commit 62ea60ba42
9 changed files with 125 additions and 2 deletions

View File

@ -109,6 +109,16 @@ struct Config {
* It is not planned to add any different focus models. */
bool disable_focus_follows_mouse;
/** By default, when switching focus to a window on a different output
* (e.g. focusing a window on workspace 3 on output VGA-1, coming from
* workspace 2 on LVDS-1), the mouse cursor is warped to the center of
* that window.
*
* With the mouse_warping option, you can control when the mouse cursor
* should be warped. "none" disables warping entirely, whereas "output"
* is the default behavior described above. */
warping_t mouse_warping;
/** Remove borders if they are adjacent to the screen edge.
* This is useful if you are reaching scrollbar on the edge of the
* screen or do not want to waste a single pixel of displayspace.