Commit graph

14 commits

Author SHA1 Message Date
M Stoeckl 2a684cad5f Remove now-unused "input" argument of cmd_results_new
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))`
applied to `cmd_results_new`.

String usage constants have been converted from pointers to arrays when
encountered. General handler format strings were sometimes modified to
include the old input string, especially for unknown command errors.
2019-01-14 08:05:29 -05:00
Brian Ashworth f33969358c reload: apply seat cfgs after reading entire cfg
Wait until all seat configs have been read before applying them on
reload. This prevents unnecessary attachment/detachment of input
devices and therefore creation/destruction of seat devices as
individual lines are read.
2019-01-09 01:06:21 -05:00
Brian Ashworth 4d88c95790 hide_cursor: change to a seat subcommand
This makes hide_cursor a seat subcommand, which allows for seat specific
timeouts.
2018-12-30 14:17:24 +01:00
Brian Ashworth 3e8f548d1d Revamp seat configs
This makes seat configs work like output and input configs do. This also
adds support for wildcard seat configs. A seat config is still created
in the main seat command handler, but instead of creating a new one in
the subcommands and destroying the main seat command's instance, the
seat subcommands modify the main one. The seat config is then stored,
where it is merged appropriately. The seat config returned from
`store_seat_config` is then applied. When attempting to apply a wildcard
seat config, a seat specific config is queried for and if found, that is
used. Otherwise, the wildcard config is applied directly.

Additionally, instead of adding input devices to the default seat
directly when there is no seat configs, a seat config for the default
seat is created with only fallback set to true, which is more explicit.
It also fixes an issue where running a seat command at runtime (with no
seat config in the sway config), would result in all input devices being
removed from the default seat and leaving sway in an unusable state.

Also, instead of checking for any seat config, the search is for a seat
config with a fallback option seat. This makes it so if there are only
seat configs with fallback set to -1, the default seat is still created
since there is no explicit notion on what to do regarding fallbacks.
However, if there is even a single fallback 0, then the default seat is
not used as a fallback. This will be needed for seat subcommands like
hide_cursor where the user may only want to set that property without
effecting anything else.
2018-12-29 19:40:40 +01:00
Ian Fan 6cd92b193c commands: prevent running empty seat command 2018-09-08 19:53:27 +01:00
Brian Ashworth 8bfa2def88 Address first round of review for generic blocks 2018-06-02 08:07:44 -04:00
Brian Ashworth 7c810dc344 Make command block implementation generic 2018-06-02 08:07:44 -04:00
Danny Bautista 1edb2bd892 Implement cursor event simulation with sway commands. 2018-04-10 12:40:50 -04:00
Tony Crisci a82c107c76 80col 2018-04-02 11:44:42 -04:00
Tony Crisci cc3c713889 seat config handler context 2018-01-20 11:44:34 -05:00
Dominique Martinet 67985e9031 sway: change all sway_log to wlr_log 2018-01-05 23:39:46 +01:00
Tony Crisci 5c036a3eac error on not enough input/seat args for cmd 2017-12-19 05:26:55 -05:00
Tony Crisci 88bcd43ebf seat fallback config 2017-12-17 10:39:22 -05:00
Tony Crisci 92fef27eaa basic configuration 2017-12-14 11:11:56 -05:00