aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--com.dec05eba.gpu_screen_recorder.appdata.xml7
-rw-r--r--src/main.cpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/com.dec05eba.gpu_screen_recorder.appdata.xml b/com.dec05eba.gpu_screen_recorder.appdata.xml
index 7b27f70..c6afe46 100644
--- a/com.dec05eba.gpu_screen_recorder.appdata.xml
+++ b/com.dec05eba.gpu_screen_recorder.appdata.xml
@@ -92,6 +92,13 @@
</screenshots>
<releases>
+ <release version="5.0.3" date="2024-12-31">
+ <description>
+ <ul>
+ <li>Fix unable to properly add program to system startup on immutable distros</li>
+ </ul>
+ </description>
+ </release>
<release version="5.0.2" date="2024-12-31">
<description>
<ul>
diff --git a/src/main.cpp b/src/main.cpp
index c22634d..0542b8a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1035,6 +1035,7 @@ static GdkFilterReturn filter_callback(GdkXEvent *xevent, GdkEvent*, gpointer us
return GDK_FILTER_CONTINUE;
Window target_win = ev->xbutton.subwindow;
+ // TODO: Fix, this is incorrect when trying to record steam window. For steam window
Window new_window = window_get_target_window_child(_select_window_userdata->display, target_win);
if(new_window)
target_win = new_window;
@@ -2788,7 +2789,8 @@ static gboolean on_click_switch_to_new_ui(GtkButton*, gpointer) {
return true;
}
- bool service_install_successful = system("flatpak-spawn --host -- pkexec install -Dm644 /var/lib/flatpak/app/com.dec05eba.gpu_screen_recorder/current/active/files/share/gpu-screen-recorder/gpu-screen-recorder-ui.service /usr/lib/systemd/user/gpu-screen-recorder-ui.service") == 0;
+ bool service_install_successful = (system("flatpak-spawn --host -- pkexec rm /usr/lib/systemd/user/gpu-screen-recorder-ui.service") <= 1);
+ service_install_successful &= (system("flatpak-spawn --host -- install -Dm644 /var/lib/flatpak/app/com.dec05eba.gpu_screen_recorder/current/active/files/share/gpu-screen-recorder/gpu-screen-recorder-ui.service \"${XDG_DATA_HOME:-$HOME/.local/share}/systemd/user/gpu-screen-recorder-ui.service\"") == 0);
service_install_successful &= (system("flatpak-spawn --host -- systemctl --user daemon-reload") == 0);
service_install_successful &= (system("flatpak-spawn --host -- systemctl enable --now --user gpu-screen-recorder-ui") == 0);
if(!service_install_successful) {