Dont render emoji, fix wayland freezing for some people (gamescope window title freezes shit)

This commit is contained in:
dec05eba
2026-04-26 22:26:09 +02:00
parent eb6aed9cfd
commit 57c60b6aee
4 changed files with 5 additions and 22 deletions

2
TODO
View File

@@ -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.

View File

@@ -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')

View File

@@ -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);