From 20e60a87fa8052cfc6f840b71a55d1e3c2343729 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 24 May 2019 22:40:36 +0100 Subject: [PATCH] recheck_focus doesn't need to return anything Signed-off-by: Yuxuan Shui --- src/compton.c | 8 +++----- src/compton.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compton.c b/src/compton.c index 59a2c6c..4e1bbde 100644 --- a/src/compton.c +++ b/src/compton.c @@ -319,11 +319,11 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode) { * @param ps current session * @return struct _win of currently focused window, NULL if not found */ -struct managed_win *recheck_focus(session_t *ps) { +void recheck_focus(session_t *ps) { // Use EWMH _NET_ACTIVE_WINDOW if enabled if (ps->o.use_ewmh_active_win) { update_ewmh_active_win(ps); - return ps->active_win; + return; } // Determine the currently focused window so we can apply appropriate @@ -345,10 +345,8 @@ struct managed_win *recheck_focus(session_t *ps) { // And we set the focus state here if (w) { win_set_focused(ps, w, true); - return w; + return; } - - return NULL; } /** diff --git a/src/compton.h b/src/compton.h index 3d016a9..f0a74d7 100644 --- a/src/compton.h +++ b/src/compton.h @@ -42,7 +42,7 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode); xcb_window_t find_client_win(session_t *ps, xcb_window_t w); -struct managed_win *recheck_focus(session_t *ps); +void recheck_focus(session_t *ps); /// Handle configure event of a root window void configure_root(session_t *ps, int width, int height);