patch 9.1.0881: GUI: message dialog may not get focus
Commit:
https://github.com/vim/vim/commit/991603cc04149aeed86470637540b22bc9f622c2
Author: Chris White <
christop...@crowdstrike.com>
Date: Sat Nov 23 13:35:43 2024 +0100
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 <
christop...@crowdstrike.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index 69a9cae9f..e8093e7c6 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 fe1246adf..4eea94afc 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,
/**/