diff options
-rw-r--r-- | com.dec05eba.gpu_screen_recorder.appdata.xml | 7 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | project.conf | 2 | ||||
-rw-r--r-- | src/config.hpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 27 |
5 files changed, 11 insertions, 29 deletions
diff --git a/com.dec05eba.gpu_screen_recorder.appdata.xml b/com.dec05eba.gpu_screen_recorder.appdata.xml index f90efd3..1d93bea 100644 --- a/com.dec05eba.gpu_screen_recorder.appdata.xml +++ b/com.dec05eba.gpu_screen_recorder.appdata.xml @@ -93,6 +93,13 @@ </screenshots> <releases> + <release version="5.1.3" date="2025-02-03"> + <description> + <ul> + <li>Fix unable to type keys (except hotkeys) when switching to new ui on steam deck (and possibly other devices)</li> + </ul> + </description> + </release> <release version="5.1.2" date="2025-01-26"> <description> <ul> diff --git a/meson.build b/meson.build index 04a4573..5b2a926 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '5.1.2', default_options : ['warning_level=2']) +project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '5.1.3', default_options : ['warning_level=2']) add_project_arguments('-Wshadow', language : ['c', 'cpp']) if get_option('buildtype') == 'debug' diff --git a/project.conf b/project.conf index 00123ff..58201b0 100644 --- a/project.conf +++ b/project.conf @@ -1,7 +1,7 @@ [package] name = "gpu-screen-recorder-gtk" type = "executable" -version = "5.1.2" +version = "5.1.3" platforms = ["posix"] [config] diff --git a/src/config.hpp b/src/config.hpp index 56a488c..4f28994 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -50,7 +50,6 @@ struct MainConfig { bool restore_portal_session = true; bool use_new_ui = false; int32_t installed_gsr_global_hotkeys_version = 0; - bool kbd_mouse_update_installed = false; }; struct YoutubeStreamConfig { @@ -339,7 +338,6 @@ static std::map<std::string, ConfigValue> get_config_options(Config &config) { {"main.restore_portal_session", {CONFIG_TYPE_BOOL, &config.main_config.restore_portal_session}}, {"main.use_new_ui", {CONFIG_TYPE_BOOL, &config.main_config.use_new_ui}}, {"main.installed_gsr_global_hotkeys_version", {CONFIG_TYPE_I32, &config.main_config.installed_gsr_global_hotkeys_version}}, - {"main.kbd_mouse_update_installed", {CONFIG_TYPE_BOOL, &config.main_config.kbd_mouse_update_installed}}, {"streaming.service", {CONFIG_TYPE_STRING, &config.streaming_config.streaming_service}}, {"streaming.youtube.key", {CONFIG_TYPE_STRING, &config.streaming_config.youtube.stream_key}}, diff --git a/src/main.cpp b/src/main.cpp index 6c41e14..9d92b23 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,7 @@ extern "C" { #include <vector> #include <libayatana-appindicator/app-indicator.h> -#define GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION 4 +#define GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION 5 #ifndef GSR_VERSION #define GSR_VERSION "unknown" @@ -2779,7 +2779,6 @@ static bool kms_server_proxy_setup_gsr_ui(const char *msg) { config.main_config.use_new_ui = true; config.main_config.installed_gsr_global_hotkeys_version = GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION; - config.main_config.kbd_mouse_update_installed = true; save_config(config); return true; } @@ -4518,28 +4517,6 @@ static void start_gtk_run_handler(std::function<void()> handler) { g_object_unref(app); } -// TODO: Remove this once GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION is updated to 5 -static bool has_input_device_with_keyboard_and_mouse() { - FILE *f = fopen("/proc/bus/input/devices", "rb"); - if(!f) - return false; - - bool current_device_is_virtual = false; - bool kbd_and_mouse = false; - char line[1024]; - while(fgets(line, sizeof(line), f)) { - if(strncmp(line, "S:", 2) == 0) { - current_device_is_virtual = strstr(line, "/virtual/") != nullptr; - } else if(!current_device_is_virtual && strncmp(line, "H:", 2) == 0 && strstr(line, "kbd") && strstr(line, "mouse")) { - kbd_and_mouse = true; - break; - } - } - - fclose(f); - return kbd_and_mouse; -} - static void startup_new_ui(bool launched_by_daemon) { if(!dpy) { if(launched_by_daemon) { @@ -4571,7 +4548,7 @@ static void startup_new_ui(bool launched_by_daemon) { return; } - if(config.main_config.installed_gsr_global_hotkeys_version != GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION || (!config.main_config.kbd_mouse_update_installed && has_input_device_with_keyboard_and_mouse())) { + if(config.main_config.installed_gsr_global_hotkeys_version != GSR_CURRENT_GLOBAL_HOTKEYS_CODE_VERSION) { bool finished = false; start_gtk_run_handler([&finished]() { finished = kms_server_proxy_setup_gsr_ui( |