Commit graph

21 commits

Author SHA1 Message Date
Ryan Dwyer 9ea71f292b Introduce cursor_rebase
This function "rebases" the cursor on top of whatever is underneath it,
without triggering any focus changes.
2018-10-19 22:47:54 +10:00
Brian Ashworth 2e637b7368 cmd_bind{sym,code}: Implement per-device bindings
bindsym --input-device=<identifier> ...
bindcode --input-device=<identifier> ...
2018-10-18 13:42:01 -04:00
Rouven Czerwinski 0969bf758b cursor: functions to warp cursor to container and workspace
The new functions allow a cursor to be warped without changing the focus.
This is a preparation commit to handle cursor warping not only in
seat_set_focus_warp.
2018-10-16 15:47:02 +02:00
Jonathan Buch 7727d54faf
Fix focusing topmost floating windows
Re-focus on the container on which the cursor hovers over.  A
special case is, if there are menus or other subsurfaces open
in the focused container.  It will prefer the focused container
as long as there are subsurfaces.

This commit starts caching the previous node as well as the
previous x/y cursor position.  Re-calculating the previous
focused node by looking at the current state of the cursor
position does not work, if the environment changes.
2018-10-03 16:23:14 +02:00
frsfnrrg 94dd8823a0 Invoke mouse bindings
The mouse binding logic is inspired/copied from the
keyboard binding logic; we store a sorted list of the
currently pressed buttons, and trigger a binding when
the currently pressed (or just recently pressed, in
the case of a release binding) buttons, as well as
modifiers/container region, match those of a given
binding.

As the code to execute a binding is not very keyboard
specific, keyboard_execute_command is renamed to
seat_execute_command and moved to where the other
binding handling functions are. The call to
transaction_commit_dirty has been lifted out.
2018-07-23 21:38:29 -04:00
Ryan Dwyer 6767d8a593 Prevent re-uploading the same cursor image multiple times 2018-07-22 23:10:19 +10:00
Scott Leggett 1b8de39287 Move previous cursor_position inline. 2018-05-28 02:14:19 +10:00
Scott Leggett 4cd304e4ba Store previous position in sway_cursor. 2018-05-28 01:37:43 +10:00
Scott Leggett 06098bef98 Focus containers only on entry. 2018-05-27 15:29:48 +10:00
Brian Ashworth 82cd55a670 Fix border commands from changing focus 2018-05-20 23:12:33 -04:00
emersion 4cf77e1de4
Default to current time when triggering cursor events 2018-04-21 14:07:22 +01:00
Danny Bautista c355d680e9 Clean up cursor simulation code. 2018-04-10 15:40:27 -04:00
Danny Bautista 1edb2bd892 Implement cursor event simulation with sway commands. 2018-04-10 12:40:50 -04:00
Drew DeVault 9c5a88a7bd Fix cursor motion issues
Use only one canonical cursor x/y position and send cursor enter when
mouse is warped.

Tangentally related to #1714
2018-04-08 12:42:56 -04:00
Drew DeVault 9114d3b84c Implement tablet tool support 2018-04-08 10:48:13 -04:00
emersion 6c9d67b105
Handle set_cursor requests from clients
Allow clients to set a custom cursor if they have the seat's
pointer focus.
2018-03-30 10:53:18 -04:00
Dominique Martinet 5766f426aa config reload: destroy old seat when removed from config
This adds new sway_seat_destroy and sway_cursor_destroy helpers
and compare new and old config on free
2018-01-22 07:26:37 +01:00
Tony Crisci d3d3604760 fix header includes 2017-12-16 08:33:22 -05:00
Tony Crisci e69b052a6d working pointer motion 2017-12-10 08:48:44 -05:00
Tony Crisci 7c67bea942 sway xcursor manager 2017-12-09 11:51:28 -05:00
Tony Crisci d76e745b73 input include directory 2017-12-08 08:07:47 -05:00
Renamed from include/sway/cursor.h (Browse further)