From 53eaffd35f48fb420115b704da30b74c698b0fcc Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov Date: Mon, 19 Oct 2026 00:04:40 +0300 Subject: [PATCH] Keep the Edit accounts window above a fullscreen main window account_edit_focus() made the window transient only for the currently focused window. When there is none (e.g. the account preferences dialog has just been closed, or the menu took the focus), the modal window got no parent and a fullscreen main window covered it, leaving the application unresponsive. Fall back to the main window in this case. Reported at https://bugzilla.altlinux.org/44212 --- src/account.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/account.c b/src/account.c index ab481f8dd..057dede52 100644 --- a/src/account.c +++ b/src/account.c @@ -384,10 +384,19 @@ GList *account_get_list(void) void account_edit_focus(void) { + MainWindow *mainwin; + if (edit_account.window == NULL) { return; } - manage_window_set_transient(GTK_WINDOW(edit_account.window)); + /* Keep the window above its parent: with no focused window (e.g. after + * the account preferences dialog has been closed) fall back to the main + * window, otherwise a fullscreen main window covers this modal window */ + if (focus_window && focus_window != edit_account.window) + manage_window_set_transient(GTK_WINDOW(edit_account.window)); + else if ((mainwin = mainwindow_get_mainwindow()) != NULL) + gtk_window_set_transient_for(GTK_WINDOW(edit_account.window), + GTK_WINDOW(mainwin->window)); gtk_widget_grab_focus(edit_account.close_btn); gtk_widget_show(edit_account.window); gtk_window_set_modal(GTK_WINDOW(edit_account.window), TRUE); -- 2.50.1