[gnome-terminal] prefs: Hold application while the prefs are shown



commit d0257f7ea7453d5305a5fd48a4a96f4db0ee7ce6
Author: Christian Persch <chpe src gnome org>
Date:   Fri Aug 26 22:10:31 2022 +0200

    prefs: Hold application while the prefs are shown

 src/terminal-prefs-process.cc | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/terminal-prefs-process.cc b/src/terminal-prefs-process.cc
index 00994a75..989fe910 100644
--- a/src/terminal-prefs-process.cc
+++ b/src/terminal-prefs-process.cc
@@ -363,6 +363,7 @@ G_DEFINE_TYPE_WITH_CODE(TerminalPrefsProcess,
 static void
 terminal_prefs_process_init(TerminalPrefsProcess* process) /* noexcept */
 {
+  g_application_hold(g_application_get_default());
 }
 
 static void
@@ -375,6 +376,8 @@ terminal_prefs_process_finalize(GObject* object) noexcept
   g_clear_object(&impl->subprocess);
 
   G_OBJECT_CLASS(terminal_prefs_process_parent_class)->finalize(object);
+
+  g_application_release(g_application_get_default());
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]