On the GTK4 GUI, opening a menubar popover (File, Edit, etc.) and dismissing it without selecting an item leaves keyboard focus outside the drawing area, so the cursor stays in the unfocused (outline) shape until the pointer is moved back over the drawarea — at which point enter_notify_event re-grabs focus as a side effect.
This installs an emission hook on GtkPopover::closed and, when the closing popover descends from gui.menubar, schedules an idle callback that grabs focus back to the drawing area. The grab is deferred via g_idle_add because GTK is still completing the close transition when the signal fires, so a synchronous gtk_widget_grab_focus() is silently a no-op.
Fixes #20274
https://github.com/vim/vim/pull/20291
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()