From ff88908531a9d20667c6d08f01d7d887ebb60fe8 Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Sun, 19 Dec 2021 23:05:35 +0600 Subject: specify func argument and related cleanup (#183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * specifies the function argument type in commands.h compared to leaving it unspecified. all the functions in cmd_t must have arg_t as it's argument. * changes to commands.h will now trigger a rebuild - this restores old behavior prior to 12efa0e * cg_quit now uses it's argument as exit status * DestroyNotify invokes cg_quit rather than calling exit directly. * Explicitly pass EXIT_SUCCESS to cgquit in keybinding Co-authored-by: Berke Kocaoğlu --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 0db7a9b..3a26b7a 100644 --- a/config.def.h +++ b/config.def.h @@ -89,7 +89,7 @@ static const KeySym KEYHANDLER_ABORT = XK_Escape; /* keyboard mappings for image and thumbnail mode: */ static const keymap_t keys[] = { /* modifiers key function argument */ - { 0, XK_q, g_quit, None }, + { 0, XK_q, g_quit, EXIT_SUCCESS }, { 0, XK_Return, g_switch_mode, None }, { 0, XK_f, g_toggle_fullscreen, None }, { 0, XK_b, g_toggle_bar, None }, -- cgit v1.2.3-54-g00ecf