From 4fc1f8294c168d42db618f50f367b585ac957e0d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 21 Nov 2024 01:40:14 +0100 Subject: Revert focus to pointer location when ui is closed --- src/Overlay.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Overlay.cpp') diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 3a0754f..720bb2e 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -232,7 +232,7 @@ namespace gsr { } static void set_focused_window(Display *dpy, Window window) { - XSetInputFocus(dpy, window, RevertToParent, CurrentTime); + XSetInputFocus(dpy, window, RevertToPointerRoot, CurrentTime); const Atom net_active_window_atom = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); XChangeProperty(dpy, DefaultRootWindow(dpy), net_active_window_atom, XA_WINDOW, 32, PropModeReplace, (const unsigned char*)&window, 1); @@ -1078,8 +1078,10 @@ namespace gsr { } if(record_options.merge_audio_tracks) { - args.push_back("-a"); - args.push_back(audio_devices_merged.c_str()); + if(!audio_devices_merged.empty()) { + args.push_back("-a"); + args.push_back(audio_devices_merged.c_str()); + } } else { for(const std::string &audio_track : audio_tracks) { args.push_back("-a"); -- cgit v1.2.3