From a7587c0296ab420f3642dc71dfa5deaffdb0c242 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Sat, 4 Jul 2020 11:09:33 -0300 Subject: [PATCH] UI: Fix scene switcher not detecting some windows --- .../frontend-tools/auto-scene-switcher-nix.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp b/UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp index fd3c3079a..0f9084db2 100644 --- a/UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp +++ b/UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp @@ -174,6 +174,14 @@ void GetCurrentWindowTitle(string &title) if (status >= Success && name != nullptr) { std::string str(name); title = str; + } else { + XTextProperty xtp_new_name; + if (XGetWMName(disp(), data[0], &xtp_new_name) != 0 && + xtp_new_name.value != nullptr) { + std::string str((const char *)xtp_new_name.value); + title = str; + XFree(xtp_new_name.value); + } } XFree(name);