diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-07-04 19:05:01 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-07-04 19:05:01 +0300 |
| commit | ae753da6f8f9a2fb1b0c84ee29c4110690c49ffd (patch) | |
| tree | 57dc29466c343f28197a1047524f8fbc96e4412e | |
| parent | 06b8a04342e15411c16e95072f09c26268032a30 (diff) | |
| download | fungus-launcher-ae753da6f8f9a2fb1b0c84ee29c4110690c49ffd.tar.gz fungus-launcher-ae753da6f8f9a2fb1b0c84ee29c4110690c49ffd.tar.xz | |
actually terminate on close button in splash if error condition
| -rw-r--r-- | fungus/splash_window.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fungus/splash_window.py b/fungus/splash_window.py index 4102644..bc9559b 100644 --- a/fungus/splash_window.py +++ b/fungus/splash_window.py @@ -12,7 +12,7 @@ from collections.abc import Callable import gi gi.require_version("Gtk", "3.0") -from gi.repository import Gtk # type: ignore +from gi.repository import Gtk, GLib # type: ignore from fungus.constants import fungus_png @@ -184,5 +184,11 @@ class SplashWindow: # ── Internal ────────────────────────────────────────────────────────── def _on_close_clicked(self, _widget: Gtk.Widget) -> None: - """Handle the Close button click.""" + """Handle the Close button click. + + When the Close button is visible (error mode), quit GTK — the + game process is already dead and there is nothing left to do. + """ + if self._close_button is not None and self._close_button.get_visible(): + GLib.idle_add(Gtk.main_quit) self.close() |
