aboutsummaryrefslogtreecommitdiff
path: root/src/Overlay.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-04 03:06:49 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-04 03:06:49 +0100
commit6b023051eb044f1c72b5e70068d35c24c145fba9 (patch)
tree02aff392ed787c07f79090e31044b29d2771705e /src/Overlay.cpp
parent2aaf6b8380e238bd993ddd19585fa392771824ec (diff)
Fallback to focused window for x11 uncomposited
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r--src/Overlay.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index eb4ea4b..dd16243 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -2052,7 +2052,9 @@ namespace gsr {
return false;
bool window_texture_loaded = false;
- const Window focused_window = get_focused_window(display, WindowCaptureType::CURSOR);
+ Window focused_window = get_focused_window(display, WindowCaptureType::CURSOR);
+ if(!focused_window)
+ focused_window = get_focused_window(display, WindowCaptureType::FOCUSED);
if(focused_window && is_window_fullscreen_on_monitor(display, focused_window, monitor))
window_texture_loaded = window_texture_init(&window_texture, display, mgl_window_get_egl_display(window->internal_window()), focused_window, egl_funcs) == 0;