dbus: simplify getting focused window

Remove find_focused

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-05-24 22:53:11 +01:00
parent 20e60a87fa
commit 51476cafa4
2 changed files with 2 additions and 19 deletions

View File

@ -437,22 +437,6 @@ static inline bool bkend_use_glx(session_t *ps) {
return BKEND_GLX == ps->o.backend || BKEND_XR_GLX_HYBRID == ps->o.backend;
}
/**
* Find out the currently focused window.
*
* @return struct win object of the found window, NULL if not found
*/
static inline struct managed_win *find_focused(session_t *ps) {
if (!ps->o.track_focus) {
return NULL;
}
if (ps->active_win && win_is_focused_real(ps, ps->active_win)) {
return ps->active_win;
}
return NULL;
}
static void set_ignore(session_t *ps, unsigned long sequence) {
if (ps->o.show_all_xerrors)
return;