From: Chris White Date: Sat, 23 Nov 2024 12:35:43 +0000 (+0100) Subject: patch 9.1.0881: GUI: message dialog may not get focus X-Git-Tag: v9.1.0881^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=991603cc04149aeed86470637540b22bc9f622c2;p=thirdparty%2Fvim.git patch 9.1.0881: GUI: message dialog may not get focus Problem: GUI: message dialog may not get focus Solution: add window manager hint to give focus to the dialog (Chris White) Tell the window manager that message dialogs should be given focus when the user switches from another application back to Vim. This can happen, e.g., when the user has a file open in Vim and then edits it in another program. fixes: #172 closes: #16100 Signed-off-by: Chris White Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk.c b/src/gui_gtk.c index 69a9cae9fc..e8093e7c66 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1790,6 +1790,8 @@ gui_mch_dialog(int type, // type of dialog dialog = create_message_dialog(type, title, message); dialoginfo.dialog = GTK_DIALOG(dialog); dialog_add_buttons(GTK_DIALOG(dialog), buttons); + gtk_window_set_type_hint(GTK_WINDOW(dialog), + GDK_WINDOW_TYPE_HINT_POPUP_MENU); if (textfield != NULL) { diff --git a/src/version.c b/src/version.c index fe1246adf1..4eea94afc3 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 881, /**/ 880, /**/