0
0
mirror of https://github.com/vim/vim.git synced 2025-10-16 07:24:23 -04:00

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 <christopher.white@crowdstrike.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Chris White
2024-11-23 13:35:43 +01:00
committed by Christian Brabandt
parent cacfccf803
commit 991603cc04
2 changed files with 4 additions and 0 deletions

View 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)
{

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
881,
/**/
880,
/**/