瀏覽代碼

libobs: Open a separate X11 connection for hotkeys

Qt will mask certain input events. In order to avoid them masking things
like mouse button events we open a new display here.

Fixes #4843
Kurt Kartaltepe 4 年之前
父節點
當前提交
bcb04bb800
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      libobs/obs-nix-x11.c

+ 2 - 1
libobs/obs-nix-x11.c

@@ -828,7 +828,8 @@ static inline void registerMouseEvents(struct obs_core_hotkeys *hotkeys)
 
 
 static bool obs_nix_x11_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
 static bool obs_nix_x11_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
 {
 {
-	Display *display = obs_get_nix_platform_display();
+	// Open a new X11 connection here, this avoids Qt masking events we care about.
+	Display *display = XOpenDisplay(NULL);
 	if (!display)
 	if (!display)
 		return false;
 		return false;