From 57c60b6aee3398b104a32163c011943fe5374b13 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 26 Apr 2026 22:26:09 +0200 Subject: [PATCH] Dont render emoji, fix wayland freezing for some people (gamescope window title freezes shit) --- TODO | 2 ++ depends/mglpp | 2 +- meson.build | 2 +- src/Overlay.cpp | 21 +-------------------- 4 files changed, 5 insertions(+), 22 deletions(-) diff --git a/TODO b/TODO index 91740ba..6c1faa4 100644 --- a/TODO +++ b/TODO @@ -260,3 +260,5 @@ Keep replay turned on when opening a fullscreen application and alt-tabbing. Onl Show vulkan codec options. Use wlroots protocol for region selection, if the protocol is available. + +Fix kwin wayland and hyprland window title. Make it work on gnome as well. diff --git a/depends/mglpp b/depends/mglpp index 0542df4..41d2ad6 160000 --- a/depends/mglpp +++ b/depends/mglpp @@ -1 +1 @@ -Subproject commit 0542df4974a28899eeda9c12f1aaaf6e14875219 +Subproject commit 41d2ad6c42bec09cc4018feb2056f0be828da482 diff --git a/meson.build b/meson.build index a7c3556..422f16c 100644 --- a/meson.build +++ b/meson.build @@ -61,7 +61,7 @@ src = [ subdir('protocol') src += protocol_src -mglpp_proj = subproject('mglpp') +mglpp_proj = subproject('mglpp', default_options : ['wayland=false']) mglpp_dep = mglpp_proj.get_variable('mglpp_dep') prefix = get_option('prefix') diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 921eca7..3c60316 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -2086,32 +2086,13 @@ namespace gsr { return ClipboardFile::FileType::PNG; } - // Returns an empty string on failure - static std::string gamescope_get_game_name() { - std::string focused_window_name; - Display *gamescope_dpy = XOpenDisplay(":2"); // This is assuming gamescope is :2, which may not always be true - if(!gamescope_dpy) - return focused_window_name; - - if(get_window_manager_name(gamescope_dpy) == "steamcompmgr") - focused_window_name = get_focused_window_name(gamescope_dpy, WindowCaptureType::FOCUSED, false); - - XCloseDisplay(gamescope_dpy); - return focused_window_name; - } - void Overlay::save_video_in_current_game_directory(std::string &video_filepath, NotificationType notification_type) { mgl_context *context = mgl_get_context(); Display *display = (Display*)context->connection; const std::string video_filename = filepath_get_filename(video_filepath.c_str()); const Window gsr_ui_window = window ? (Window)window->get_system_handle() : None; - // Checking for gamescope window name is not needed on x11 because on x11 gamescope uses the host x11 so applications - // running inside gamescope appears in the hosts x11 server - std::string focused_window_name = gsr_info.system_info.display_server != DisplayServer::X11 ? gamescope_get_game_name() : ""; - - if(focused_window_name.empty()) - focused_window_name = get_window_name_at_cursor_position(display, gsr_ui_window); + std::string focused_window_name = get_window_name_at_cursor_position(display, gsr_ui_window); if(focused_window_name.empty()) focused_window_name = get_focused_window_name(display, WindowCaptureType::FOCUSED, false);