workspace taskbars: Minor fixes
- Add missing CSS class to manpage - Fix rare segfault when address is not found (seems to only happen when compiled for production)
This commit is contained in:
@ -210,3 +210,4 @@ Additional to workspace name matching, the following *format-icons* can be set.
|
|||||||
- *#workspaces button.special*
|
- *#workspaces button.special*
|
||||||
- *#workspaces button.urgent*
|
- *#workspaces button.urgent*
|
||||||
- *#workspaces button.hosting-monitor* (gets applied if workspace-monitor == waybar-monitor)
|
- *#workspaces button.hosting-monitor* (gets applied if workspace-monitor == waybar-monitor)
|
||||||
|
- *#workspaces .taskbar-window* (each window in the taskbar)
|
||||||
|
@ -548,12 +548,11 @@ void Workspaces::onWindowTitleEvent(std::string const &payload) {
|
|||||||
Json::Value clientsData = gIPC->getSocket1JsonReply("clients");
|
Json::Value clientsData = gIPC->getSocket1JsonReply("clients");
|
||||||
std::string jsonWindowAddress = fmt::format("0x{}", payload);
|
std::string jsonWindowAddress = fmt::format("0x{}", payload);
|
||||||
|
|
||||||
auto client =
|
auto client = std::ranges::find_if(clientsData, [&jsonWindowAddress](auto &c) {
|
||||||
std::find_if(clientsData.begin(), clientsData.end(), [jsonWindowAddress](auto &client) {
|
return c["address"].asString() == jsonWindowAddress;
|
||||||
return client["address"].asString() == jsonWindowAddress;
|
});
|
||||||
});
|
|
||||||
|
|
||||||
if (!client->empty()) {
|
if (client != clientsData.end() && !client->empty()) {
|
||||||
(*inserter)({*client});
|
(*inserter)({*client});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user