Merge pull request #3801 from majutsushi/sway-workspaces-x11-class

sway/workspaces: use X11 class for XWayland windows
This commit is contained in:
Alexis Rouillard
2024-12-07 09:55:57 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@ -260,7 +260,9 @@ void Workspaces::updateWindows(const Json::Value &node, std::string &windows) {
if ((node["type"].asString() == "con" || node["type"].asString() == "floating_con") &&
node["name"].isString()) {
std::string title = g_markup_escape_text(node["name"].asString().c_str(), -1);
std::string windowClass = node["app_id"].asString();
std::string windowClass = node["app_id"].isString()
? node["app_id"].asString()
: node["window_properties"]["class"].asString();
// Only add window rewrites that can be looked up
if (!windowClass.empty()) {