From e25c9811ee6b4020f0d312bf858fdb9954be9e56 Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Sun, 29 Oct 2023 18:30:40 -0400 Subject: [PATCH] Hide the Lutris window instead of deleting it on close, when the tray icon is turned on. Resolves #5109 --- lutris/gui/lutriswindow.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py index d93b94f64..e41395e83 100644 --- a/lutris/gui/lutriswindow.py +++ b/lutris/gui/lutriswindow.py @@ -844,7 +844,11 @@ class LutrisWindow(Gtk.ApplicationWindow, self.search_entry.set_size_request(min(max(50, size[0] - 470), 800), -1) def on_window_delete(self, *_args): - if self.application.running_games.get_n_items(): + app = self.application + if app.running_games.get_n_items(): + self.hide() + return True + if app.has_tray_icon(): self.hide() return True