diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-07-18 06:28:23 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-07-18 06:28:23 +0200 |
commit | 0993c5811f23c4601e8f5768ee48e8832cfdbec9 (patch) | |
tree | efce52621402ef2f4663bd866942214dbc696aca /src | |
parent | d89f98349f9e60a123908caeb135314c289871f6 (diff) |
Show wayland specific error message when not system wide and flatpak
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 151fcee..ec6e2db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1089,12 +1089,20 @@ static bool show_pkexec_flatpak_error_if_needed() { } if(is_inside_flatpak() && !flatpak_is_installed_as_system()) { - GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "GPU Screen Recorder needs to be installed system-wide to record your monitor on AMD/Intel. To install GPU Screen recorder system-wide, you can run this command:\n" - "flatpak install flathub --system com.dec05eba.gpu_screen_recorder\n" - "Alternatively, record a single window which doesn't have this restriction."); - gtk_dialog_run(GTK_DIALOG(dialog)); - gtk_widget_destroy(dialog); + if(wayland) { + GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + "GPU Screen Recorder needs to be installed system-wide to record your monitor on Wayland. To install GPU Screen recorder system-wide, you can run this command:\n" + "flatpak install flathub --system com.dec05eba.gpu_screen_recorder\n"); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); + } else { + GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + "GPU Screen Recorder needs to be installed system-wide to record your monitor on AMD/Intel. To install GPU Screen recorder system-wide, you can run this command:\n" + "flatpak install flathub --system com.dec05eba.gpu_screen_recorder\n" + "Alternatively, record a single window which doesn't have this restriction."); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); + } return true; } } |