xwindow: Also listen for WM_NAME changes
This commit is contained in:
parent
918bc212ee
commit
3da2662022
@ -10,7 +10,7 @@ struct cached_atom {
|
||||
xcb_atom_t& atom;
|
||||
};
|
||||
|
||||
extern std::array<cached_atom, 36> ATOMS;
|
||||
extern std::array<cached_atom, 37> ATOMS;
|
||||
|
||||
extern xcb_atom_t _NET_SUPPORTED;
|
||||
extern xcb_atom_t _NET_CURRENT_DESKTOP;
|
||||
@ -48,3 +48,4 @@ extern xcb_atom_t ESETROOT_PMAP_ID;
|
||||
extern xcb_atom_t _COMPTON_SHADOW;
|
||||
extern xcb_atom_t _NET_WM_WINDOW_OPACITY;
|
||||
extern xcb_atom_t WM_HINTS;
|
||||
extern xcb_atom_t WM_NAME;
|
||||
|
@ -42,6 +42,7 @@ namespace modules {
|
||||
* Get the title by returning the first non-empty value of:
|
||||
* _NET_WM_NAME
|
||||
* _NET_WM_VISIBLE_NAME
|
||||
* WM_NAME
|
||||
*/
|
||||
string active_window::title() const {
|
||||
string title;
|
||||
@ -87,9 +88,7 @@ namespace modules {
|
||||
update(true);
|
||||
} else if (evt->atom == _NET_CURRENT_DESKTOP) {
|
||||
update(true);
|
||||
} else if (evt->atom == _NET_WM_VISIBLE_NAME) {
|
||||
update();
|
||||
} else if (evt->atom == _NET_WM_NAME) {
|
||||
} else if (evt->atom == _NET_WM_NAME || evt->atom == _NET_WM_VISIBLE_NAME || evt->atom == WM_NAME) {
|
||||
update();
|
||||
} else {
|
||||
return;
|
||||
|
@ -39,9 +39,10 @@ xcb_atom_t ESETROOT_PMAP_ID;
|
||||
xcb_atom_t _COMPTON_SHADOW;
|
||||
xcb_atom_t _NET_WM_WINDOW_OPACITY;
|
||||
xcb_atom_t WM_HINTS;
|
||||
xcb_atom_t WM_NAME;
|
||||
|
||||
// clang-format off
|
||||
std::array<cached_atom, 36> ATOMS = {{
|
||||
std::array<cached_atom, 37> ATOMS = {{
|
||||
{"_NET_SUPPORTED", _NET_SUPPORTED},
|
||||
{"_NET_CURRENT_DESKTOP", _NET_CURRENT_DESKTOP},
|
||||
{"_NET_ACTIVE_WINDOW", _NET_ACTIVE_WINDOW},
|
||||
@ -78,5 +79,6 @@ std::array<cached_atom, 36> ATOMS = {{
|
||||
{"_COMPTON_SHADOW", _COMPTON_SHADOW},
|
||||
{"_NET_WM_WINDOW_OPACITY", _NET_WM_WINDOW_OPACITY},
|
||||
{"WM_HINTS", WM_HINTS},
|
||||
{"WM_NAME", WM_NAME},
|
||||
}};
|
||||
// clang-format on
|
||||
|
Loading…
Reference in New Issue
Block a user