From 4305b6e072dd68127b8f311659fef8b9c25d3e2e Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 27 Jun 2024 12:13:59 +0100 Subject: [PATCH] wm/win: rename is_ewmh_focused to is_focused The old name is inaccurate, this flag is not limited to ewmh. Signed-off-by: Yuxuan Shui --- src/wm/win.c | 10 +++++----- src/wm/win.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wm/win.c b/src/wm/win.c index 383e648747..76f2050060 100644 --- a/src/wm/win.c +++ b/src/wm/win.c @@ -1665,17 +1665,17 @@ void win_set_focused(session_t *ps, struct win *w) { } auto old_active_win = wm_active_win(ps->wm); - if (w->is_ewmh_focused) { + if (w->is_focused) { assert(old_active_win == w); return; } wm_set_active_win(ps->wm, w); - w->is_ewmh_focused = true; + w->is_focused = true; if (old_active_win) { - assert(old_active_win->is_ewmh_focused); - old_active_win->is_ewmh_focused = false; + assert(old_active_win->is_focused); + old_active_win->is_focused = false; win_on_focus_change(ps, old_active_win); } win_on_focus_change(ps, w); @@ -2309,5 +2309,5 @@ bool win_is_bypassing_compositor(const session_t *ps, const struct win *w) { * settings */ bool win_is_focused_raw(const struct win *w) { - return w->a.map_state == XCB_MAP_STATE_VIEWABLE && w->is_ewmh_focused; + return w->a.map_state == XCB_MAP_STATE_VIEWABLE && w->is_focused; } diff --git a/src/wm/win.h b/src/wm/win.h index a244db0515..0368d9823e 100644 --- a/src/wm/win.h +++ b/src/wm/win.h @@ -197,8 +197,8 @@ struct win { /// `is_ewmh_fullscreen`, or the windows spatial relation with the /// root window. Which one is used is determined by user configuration. bool is_fullscreen; - /// Whether the window is the EWMH active window. - bool is_ewmh_focused; + /// Whether the window is the active window. + bool is_focused; // Opacity-related members /// Window opacity