Prepare for sound. Fix game name being gsr-ui on wayland in some cases when saving video when the ui is open

This commit is contained in:
dec05eba
2025-02-10 18:22:21 +01:00
parent 3d6354c642
commit f4e44cbef5
10 changed files with 163 additions and 4 deletions

View File

@@ -1450,7 +1450,8 @@ namespace gsr {
Display *display = (Display*)context->connection;
const std::string video_filename = filepath_get_filename(video_filepath);
std::string focused_window_name = get_focused_window_name(display, WindowCaptureType::FOCUSED);
const Window gsr_ui_window = window ? window->get_system_handle() : None;
std::string focused_window_name = get_window_name_at_cursor_position(display, gsr_ui_window);
if(focused_window_name.empty())
focused_window_name = "Game";