From bcb04bb80010fb41c2bb9ef7c0105bd169ee1d8a Mon Sep 17 00:00:00 2001 From: Kurt Kartaltepe Date: Sat, 8 Jan 2022 13:33:09 -0800 Subject: [PATCH] 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 --- libobs/obs-nix-x11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/obs-nix-x11.c b/libobs/obs-nix-x11.c index c1ed2d8f8..0f73a44a8 100644 --- a/libobs/obs-nix-x11.c +++ b/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) { - 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) return false;