sway/sway
Manuel Stoeckl 221a8b40de Have commands return cmd_results on the stack
sway commands are implemented using functions that return an error
code and (if the function was not successful) an error string. The
two are bundled together by the type `struct cmd_results`. This
patch alters the command handler prototype so that the cmd_results
objects are returned by value (on the stack), instead of by a pointer
to a heap allocated instance of a cmd_results.

The latter method had the flaw that, if the heap allocation of the
cmd_results object failed, the exact return code would be lost.
Furthermore, for some command handlers (such as those in
sway/commands/output), returning NULL signified success, so an
allocation failure could lead to an ignored error. This change
prevents both classes of errors.
2019-12-22 10:13:41 -05:00
..
commands Have commands return cmd_results on the stack 2019-12-22 10:13:41 -05:00
config config/input: set type for new identifier configs 2019-12-14 09:31:42 -05:00
desktop layer-shell: unfocus output-less layer on unmap 2019-12-10 21:09:48 -05:00
input seat_cmd_keyboard_grouping: change keymap to smart 2019-12-16 12:03:11 -05:00
tree Have commands return cmd_results on the stack 2019-12-22 10:13:41 -05:00
commands.c Have commands return cmd_results on the stack 2019-12-22 10:13:41 -05:00
config.c Have commands return cmd_results on the stack 2019-12-22 10:13:41 -05:00
criteria.c criteria: make literal comparison for __focused__ values 2019-10-27 11:06:05 -04:00
decoration.c Fix double free when unmapping any view 2018-11-15 15:22:09 +10:00
ipc-json.c add scale_filter output config option 2019-11-29 18:13:37 +01:00
ipc-server.c Have commands return cmd_results on the stack 2019-12-22 10:13:41 -05:00
main.c Fix various memory leaks 2019-11-01 12:18:09 -04:00
meson.build Add seat <seat> idle_{inhibit,wake} <sources...> 2019-12-12 10:37:30 -05:00
security.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
server.c Add sway_surface 2019-11-17 20:18:42 +01:00
sway-bar.5.scd swaybar: complete barconfig_update event handling 2019-09-04 16:48:50 -10:00
sway-input.5.scd seat_cmd_keyboard_grouping: change keymap to smart 2019-12-16 12:03:11 -05:00
sway-ipc.7.scd Revert "fix bar_state_update/input event" 2019-12-02 19:57:06 +01:00
sway-output.5.scd add scale_filter output config option 2019-11-29 18:13:37 +01:00
sway.1.scd Update language in sway.desktop & sway(1) 2019-03-10 15:09:52 -04:00
sway.5.scd view: add max_render_time 2019-11-17 20:18:42 +01:00
swaynag.c Rename symbol set_cloexec to sway_set_cloexec, remove duplicates. 2019-11-01 12:41:08 -04:00
xdg_decoration.c Fix xdg-decoration unconfigured if set before first commit 2019-05-03 15:37:32 -06:00