diff -Naur a/src/ui/rygel-preferences-dialog.vala b/src/ui/rygel-preferences-dialog.vala
--- a/src/ui/rygel-preferences-dialog.vala      2023-08-02 19:24:43.000000000 +0800
+++ b/src/ui/rygel-preferences-dialog.vala      2024-12-12 14:39:50.872326487 +0800
@@ -64,6 +64,7 @@
             this.on_upnp_switch_toggled ();
         });
 
+        this.dialog.set_deletable (true);
         this.dialog.delete_event.connect ( () => {
             this.dialog.hide ();
             this.loop.quit ();
