Fallback to focused window for x11 uncomposited

This commit is contained in:
dec05eba
2025-01-04 03:06:49 +01:00
parent 2aaf6b8380
commit 6b023051eb
2 changed files with 5 additions and 2 deletions

View File

@@ -56,4 +56,5 @@ If you want to donate you can donate via bitcoin or monero.
# Known issues # Known issues
* When the UI is open the wallpaper is shown instead of the game on Hyprland and Sway. This is an issue with Hyprland and Sway. It cant be fixed until the UI is redesigned to not be a fullscreen overlay. * When the UI is open the wallpaper is shown instead of the game on Hyprland and Sway. This is an issue with Hyprland and Sway. It cant be fixed until the UI is redesigned to not be a fullscreen overlay.
* Different keyboard layouts are not supported at the moment. The physical layout of keys are used for global hotkeys. If your Z and Y keys are swapped for example then you need to press Alt+Y instead of Alt+Z to open/hide the UI. If you experience this issue then please email dec05eba@protonmail.com to get it fixed. * Different keyboard layouts are not supported at the moment. The physical layout of keys are used for global hotkeys. If your Z and Y keys are swapped for example then you need to press Alt+Y instead of Alt+Z to open/hide the UI. If you experience this issue then please email dec05eba@protonmail.com to get it fixed.
* The mouse position can sometimes shift when opening the UI.

View File

@@ -2052,7 +2052,9 @@ namespace gsr {
return false; return false;
bool window_texture_loaded = 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)) 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; window_texture_loaded = window_texture_init(&window_texture, display, mgl_window_get_egl_display(window->internal_window()), focused_window, egl_funcs) == 0;