Hide the Lutris window instead of deleting it on close, when the tray icon is turned on.

Resolves #5109
This commit is contained in:
Daniel Johnson 2023-10-29 18:30:40 -04:00
parent 58aa2de6f7
commit e25c9811ee

View file

@ -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