aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/bind.c
AgeCommit message (Collapse)Author
2018-08-01ipc: add binding eventIan Fan
2018-07-23Invoke mouse bindingsfrsfnrrg
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-23Parse mouse binding optionsfrsfnrrg
First, the existing sway_binding structure is given an enumerated type code. As all flags to bindsym/bindcode are boolean, a single uint32 is used to hold all flags. The _BORDER, _CONTENTS, _TITLEBAR flags, when active, indicate in which part of a container the binding can trigger; to localize complexity, they do not overlap with the command line arguments, which center around _TITLEBAR being set by default. The keyboard handling code is adjusted for this change, as is binding_key_compare; note that BINDING_LOCKED is *not* part of the key portion of the binding. Next, list of mouse bindings is introduced and cleaned up. Finally, the binding command parsing code is extended to handle the case where bindsym is used to describe a mouse binding rather than a keysym binding; the difference between the two may be detected as late as when the first key/button is parsed, or as early as the first flag. As bindings can have multiple keycodes/keysyms/buttons, mixed keysym/button sequences are prohibited.
2018-07-09Update for swaywm/wlroots#1126emersion
2018-06-12Sort binding key listsfrsfnrrg
Sort the list comprising the set of keys for the binding in ascending order. (Keyboard shortcuts depend only on the set of simultaneously pressed keys, not their order, so this change should have no external effect.) This simplifies comparisons between bindings.
2018-06-01Style fixes for bind.cfrsfnrrg
2018-06-01Fix binding bindcode flag initializationfrsfnrrg
2018-06-01Use XKB keycode numbering for bindcodefrsfnrrg
2018-06-01Share common code between bindsym and bindcode commandsfrsfnrrg
2018-05-27Implement bindsym/bindcode --lockedfrsfnrrg
Adds the --locked flag to bindsym and bindcode commands. When a keyboard's associated seat has an exclusive client (i.e, a screenlocker), then bindings are only executed if they have the locked flag. When there is no such client, this restriction is lifted.
2018-01-05sway: change all sway_log to wlr_logDominique Martinet
2018-01-04binding releaseTony Crisci
2017-12-29fix nitpicksTony Crisci
2017-12-28overwrite old bindingsTony Crisci
2017-12-27binding configTony Crisci
2017-11-18Move everything to sway/old/Drew DeVault
2017-07-10fix use-after-free bugTobias Blass
2017-05-04Add mouse button bindingsJosip Janzic
Adds support for bindings like: bindsym button3 floating toggle bindsym $mod+button3 floating toggle
2016-12-15Handle allocation failure in commandsDrew DeVault
2016-09-02merge in latest commitsZandr Martin
2016-09-01refactor commands.cZandr Martin