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 --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 713e880..732e690 100644 --- a/main.c +++ b/main.c @@ -802,10 +802,10 @@ static void run(void) break; case ClientMessage: if ((Atom) ev.xclient.data.l[0] == atoms[ATOM_WM_DELETE_WINDOW]) - cg_quit(); + cg_quit(EXIT_SUCCESS); break; case DestroyNotify: - exit(EXIT_FAILURE); + cg_quit(EXIT_FAILURE); break; case ConfigureNotify: if (win_configure(&win, &ev.xconfigure)) { -- cgit v1.2.3-70-g09d2