1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-26 11:45:22 +01:00

gui_gtk: Open message dialogs should be focused when main window activates

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 https://github.com/vim/vim/issues/172

Signed-off-by: Chris White <christopher.white@crowdstrike.com>
This commit is contained in:
Chris White 2024-11-20 14:30:55 -05:00
parent 9c69453f0e
commit 5049daf2db

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