fix(logs): let the View Logs dialog close via titlebar-X (#892)

* fix(logs): let the View Logs dialog close via titlebar-X

_on_response only destroyed on ResponseType.CLOSE and ignored
DELETE_EVENT, so the Logs window could not be dismissed with the
window-manager close button — unlike Settings, which handles both. A
window force-destroyed behind the dialog then crashed quit with a
BadWindow error instead of an orderly shutdown.

* test(logs): cover _on_response behavior; annotate its signature

---------

Co-authored-by: Jatin K Malik <jatinkrmalik@gmail.com>
This commit is contained in:
devin-ai-integration[bot]
2026-09-30 05:55:33 -07:00
committed by GitHub
co-authored by Jatin K Malik
parent d11bd1bf0d
commit 4497bfae6c
2 changed files with 46 additions and 2 deletions
+2 -2
View File
@@ -622,9 +622,9 @@ class LoggingDialog(Gtk.Dialog):
return False # Remove from idle queue
def _on_response(self, dialog, response_id):
def _on_response(self, dialog: Gtk.Dialog, response_id: int) -> None:
"""Handle dialog responses."""
if response_id == Gtk.ResponseType.CLOSE:
if response_id in (Gtk.ResponseType.CLOSE, Gtk.ResponseType.DELETE_EVENT):
self.destroy()
def _export_logs(self):