Browse Source

UI: Fix scene switcher not detecting some windows

Ariel D'Alessandro 5 years ago
parent
commit
a7587c0296
1 changed files with 8 additions and 0 deletions
  1. 8 0
      UI/frontend-plugins/frontend-tools/auto-scene-switcher-nix.cpp

+ 8 - 0
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);