]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0881: GUI: message dialog may not get focus v9.1.0881
authorChris White <christopher.white@crowdstrike.com>
Sat, 23 Nov 2024 12:35:43 +0000 (13:35 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 23 Nov 2024 12:35:43 +0000 (13:35 +0100)
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 <christopher.white@crowdstrike.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_gtk.c
src/version.c

index 69a9cae9fcf2304d37688fffb6f1ad9d513d74dc..e8093e7c666524bd6fd2e51d00b52f5aa4fc47cc 100644 (file)
@@ -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)
     {
index fe1246adf1663346578e2b72f947dec21e3e78e4..4eea94afc32bd4c6f9c195c5938ba79d37c20925 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    881,
 /**/
     880,
 /**/