diff --git a/src/c2.c b/src/c2.c index eba0cff..aa1c4b5 100644 --- a/src/c2.c +++ b/src/c2.c @@ -1028,17 +1028,6 @@ static bool c2_l_postprocess(session_t *ps, c2_l_t *pleaf) { } } - // Enable specific tracking options, if needed by the condition - // TODO: Add track_leader - switch (pleaf->predef) { - // case C2_L_PROUNDED: ps->o.detect_rounded_corners = true; break; - case C2_L_PNAME: - case C2_L_PCLASSG: - case C2_L_PCLASSI: - case C2_L_PROLE: ps->o.track_wdata = true; break; - default: break; - } - // Warn about lower case characters in target name if (pleaf->predef == C2_L_PUNDEFINED) { for (const char *pc = pleaf->tgt; *pc; ++pc) { diff --git a/src/config.c b/src/config.c index 17a198b..a88bc02 100644 --- a/src/config.c +++ b/src/config.c @@ -559,7 +559,6 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable, .detect_client_leader = false, .no_ewmh_fullscreen = false, - .track_wdata = false, .track_leader = false, }; diff --git a/src/config.h b/src/config.h index 403ea54..cd32add 100644 --- a/src/config.h +++ b/src/config.h @@ -228,8 +228,6 @@ typedef struct options { bool detect_client_leader; // === Calculated === - /// Whether we need to track window name and class. - bool track_wdata; /// Whether we need to track window leaders. bool track_leader; diff --git a/src/dbus.c b/src/dbus.c index 2295045..3f6ebf1 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1047,7 +1047,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) { #endif cdbus_m_opts_get_stub(track_focus, cdbus_reply_bool, true); - cdbus_m_opts_get_do(track_wdata, cdbus_reply_bool); cdbus_m_opts_get_do(track_leader, cdbus_reply_bool); #undef cdbus_m_opts_get_do #undef cdbus_m_opts_get_stub diff --git a/src/event.c b/src/event.c index 3a3369d..9662767 100644 --- a/src/event.c +++ b/src/event.c @@ -495,8 +495,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t } // If name changes - if (ps->o.track_wdata && - (ps->atoms->aWM_NAME == ev->atom || ps->atoms->a_NET_WM_NAME == ev->atom)) { + if (ps->atoms->aWM_NAME == ev->atom || ps->atoms->a_NET_WM_NAME == ev->atom) { auto w = find_toplevel(ps, ev->window); if (w && win_update_name(ps, w) == 1) { win_on_factor_change(ps, w); @@ -504,7 +503,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t } // If class changes - if (ps->o.track_wdata && ps->atoms->aWM_CLASS == ev->atom) { + if (ps->atoms->aWM_CLASS == ev->atom) { auto w = find_toplevel(ps, ev->window); if (w) { win_get_class(ps, w); @@ -513,7 +512,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t } // If role changes - if (ps->o.track_wdata && ps->atoms->aWM_WINDOW_ROLE == ev->atom) { + if (ps->atoms->aWM_WINDOW_ROLE == ev->atom) { auto w = find_toplevel(ps, ev->window); if (w && 1 == win_get_role(ps, w)) { win_on_factor_change(ps, w); diff --git a/src/picom.c b/src/picom.c index efd8186..6bca745 100644 --- a/src/picom.c +++ b/src/picom.c @@ -309,11 +309,9 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode) { } // Check if it's a mapped client window - if (WIN_EVMODE_CLIENT == mode || + if (mode == WIN_EVMODE_CLIENT || ((w = find_toplevel(ps, wid)) && w->a.map_state == XCB_MAP_STATE_VIEWABLE)) { - if (ps->o.frame_opacity > 0 || ps->o.track_wdata || ps->track_atom_lst || - ps->o.detect_client_opacity) - evmask |= XCB_EVENT_MASK_PROPERTY_CHANGE; + evmask |= XCB_EVENT_MASK_PROPERTY_CHANGE; } return evmask; diff --git a/src/win.c b/src/win.c index 8dea681..7d95b94 100644 --- a/src/win.c +++ b/src/win.c @@ -1008,11 +1008,9 @@ void win_mark_client(session_t *ps, struct managed_win *w, xcb_window_t client) win_update_leader(ps, w); // Get window name and class if we are tracking them - if (ps->o.track_wdata) { - win_update_name(ps, w); - win_get_class(ps, w); - win_get_role(ps, w); - } + win_update_name(ps, w); + win_get_class(ps, w); + win_get_role(ps, w); // Update everything related to conditions win_on_factor_change(ps, w);