Przeglądaj źródła

linux-capture: Don't find window via class if class empty

jp9000 9 lat temu
rodzic
commit
ee4febcd06
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      plugins/linux-capture/xcompcap-main.cpp

+ 2 - 1
plugins/linux-capture/xcompcap-main.cpp

@@ -237,7 +237,8 @@ static Window getWindowFromString(std::string wstr)
 		if (cwin == wid && wname == cwinname && wcls == ccls)
 			return wid;
 
-		if (wname == cwinname || (!matchedNameWin && wcls == ccls))
+		if (wname == cwinname ||
+		    (!matchedNameWin && !wcls.empty() && wcls == ccls))
 			matchedNameWin = cwin;
 	}