Mind going into the code ? (since I did not manage to find any sort of accessible parameter to avoid the closing confirm window.)
First try : Quick and Dirty way just to see if its works according to what you wish.
Reading kgx_window.c from line 155 , roughly :
kgx_window_close_request (GtkWindow *window)
{
…
children = kgx_pages_get_children (KGX_PAGES (priv->pages));
if (children->len < 1 || priv->close_anyway) {
if (gtk_window_is_active (GTK_WINDOW (self))) {
…}
return FALSE; /* Aka no, I don’t want to block closing */}
dlg = g_object_new (KGX_TYPE_CLOSE_DIALOG,
"context", KGX_CONTEXT_WINDOW,
"commands", children,
"transient-for", self,
NULL);
kgx_close_dialog_run (dlg, NULL, got_close, g_object_ref (self));
return TRUE; /* Block the close */}
We understand that we might be able to always bypass the close confirmation window if kgx_window_close_request always returns FALSE.
I would therefore suggest to comment out :
- Line 164 (
if (children->len < 1 || priv->close_anyway) {
)
- Line 169 (the associated closing brace.)
Note that it would certainly be preferable to just force priv->close_anyway
to TRUE since the confirmation would also be skipped as also specified at the beginning of the code :
- KgxWindow: * @close_anyway: ignore running children and close
without prompt
but I had no time to find my way to force this.
Ctrl-d
? – Tom Yan Nov 13 '23 at 07:03