diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-26 10:56:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-26 10:56:29 +0200 |
commit | cf5621da81fecf1bd8f25f1a0a25d68f05c90a17 (patch) | |
tree | 4cf034b2c1dfc5056cc903c913c2f280b80dbab2 /src/main.cpp | |
parent | ba4d258c88b40e3ef174c750af4c7f0b84b744e0 (diff) |
Fix dialog warnings
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index a57a403..608fc78 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3852,16 +3852,17 @@ static const char* gpu_vendor_to_name(GpuVendor vendor) { static void activate(GtkApplication *app, gpointer) { flatpak = is_inside_flatpak(); nvfbc_installed = gsr_info.system_info.display_server != DisplayServer::WAYLAND && is_nv_fbc_installed(); + page_navigation_userdata.app = app; if(gsr_info_exit_status == GsrInfoExitStatus::FAILED_TO_RUN_COMMAND) { const char *cmd = flatpak ? "flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder -w screen -f 60 -o video.mp4" : "gpu-screen-recorder -w screen -f 60 -o video.mp4"; - GtkWidget *dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Failed to run 'gpu-screen-recorder' command. If you are using gpu-screen-recorder flatpak then this is a bug. Otherwise you need to make sure gpu-screen-recorder is installed on your system and working properly (install necessary depedencies depending on your GPU, such as libva-mesa-driver, libva-intel-driver, intel-media-driver and linux-firmware). Run:\n" "%s\n" "in a terminal to see more information about the issue.", cmd); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); - g_application_quit(G_APPLICATION(select_window_userdata.app)); + g_application_quit(G_APPLICATION(app)); return; } @@ -3954,7 +3955,6 @@ static void activate(GtkApplication *app, gpointer) { GtkWidget *streaming_page = create_streaming_page(app, stack); gtk_stack_set_visible_child(stack, common_settings_page); - page_navigation_userdata.app = app; page_navigation_userdata.stack = stack; page_navigation_userdata.common_settings_page = common_settings_page; page_navigation_userdata.replay_page = replay_page; |