[vim/vim] GTK4 mouse popup is far away from the mouse cursor (Issue #20255)

5 views
Skip to first unread message

依云

unread,
May 20, 2026, 12:35:28 AM (6 days ago) May 20
to vim/vim, Subscribed
lilydjwg created an issue (vim/vim#20255)

Steps to reproduce

  1. Run vim -g --clean -c 'set mousemodel=popup'
  2. Right click on the main area
  3. See
default.png (view on web)

The popup will be invisible when the window is maximized.

Expected behaviour

Mouse popup appears near the mouse cursor.

Version of Vim

9.2.491

Environment

Arch Linux GTK 4 GUI, Wayland compositor.

Logs and stack traces


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.Message ID: <vim/vim/issues/20255@github.com>

mattn

unread,
May 20, 2026, 1:20:32 AM (6 days ago) May 20
to vim/vim, Subscribed
mattn left a comment (vim/vim#20255)

Could you try #20260 and let me know if it fixes the popup position issue? Thanks.


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.Message ID: <vim/vim/issues/20255/4494760097@github.com>

依云

unread,
May 20, 2026, 2:28:58 AM (6 days ago) May 20
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20255)

The popup is now placed below the cursor. I expected it to be to the right and below, but it is OK if this is by design.

It however breaks the display. After a right click, only the text cursor is still normal, everywhere else in the drawing area is pure white until a redraw happens.


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.Message ID: <vim/vim/issues/20255/4495246909@github.com>

mattn

unread,
May 20, 2026, 8:56:54 PM (5 days ago) May 20
to vim/vim, Subscribed
mattn left a comment (vim/vim#20255)

Thanks for retesting! Both points are addressed in #20260 (force-pushed):

  • Centring: GtkPopover with GTK_POS_BOTTOM anchors its horizontal centre to the pointing-to rectangle's centre. The popover's natural width is now measured and used for rect.width, so the popover's left edge lands at the cursor — i.e. down-and-to-the-right, matching the usual context-menu placement.
  • Drawing area blanks while popover is open: caused by parenting the popover to gui.drawarea. GtkDrawingArea is a leaf widget whose snapshot does not iterate children, so hosting a popover there confused the render tree (visible on Wayfire). The popover is now parented to the surrounding GtkOverlay, and a redraw is queued when it closes so the parent surface is repainted after the popover sub-surface is gone.


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.Message ID: <vim/vim/issues/20255/4503845366@github.com>

依云

unread,
May 21, 2026, 1:38:21 AM (5 days ago) May 21
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20255)

The drawing problem is fixed, but the placement doesn't change for me. Tested commit is 5876ea1.

What's more, I find another problem: these menu items don't work. Selecting them does nothing.


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.Message ID: <vim/vim/issues/20255/4505112030@github.com>

mattn

unread,
May 24, 2026, 7:22:44 AM (yesterday) May 24
to vim/vim, Subscribed
mattn left a comment (vim/vim#20255)

Thanks for the additional report. Several other GTK4 fixes have landed on master since you tested, and I've rebased #20260 on top of them. Could you give the rebased branch another try? On my setup I can't reproduce either the blanked drawing area or the unresponsive menu items, so any Gtk-WARNING / Gtk-CRITICAL printed to stderr when the issue happens — plus your $XDG_SESSION_TYPE and Wayfire / GTK versions — would help narrow down whether what's left is environment-specific.


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.Message ID: <vim/vim/issues/20255/4528345834@github.com>

依云

unread,
3:39 AM (19 hours ago) 3:39 AM
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20255)

Nothing has changed since my last test: the menu is centered horizontally with respect to the mouse pointer, and menu items don't work.

The blanking issue has been fixed previously.

The menu items are responsive; it just doesn't do what is supposed to do. Right click on a word and select Select Word, but nothing is selected. Select text, right click and select Delete from the menu, but Vim remains in VISUAL mode and nothing is deleted.

There is no Gtk-WARNING or Gtk-CRITICAL, or anything like that. $XDG_SESSION_TYPE is wayland, Wayfire is master, GTK version is 4.22.4.


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.Message ID: <vim/vim/issues/20255/4532460287@github.com>

依云

unread,
3:56 AM (18 hours ago) 3:56 AM
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20255)

I've tested in KDE 6 (Wayland) in a virtual machine. It has the same issue, with some additional Vulkan-related warnings.


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.Message ID: <vim/vim/issues/20255/4532562505@github.com>

依云

unread,
10:34 AM (12 hours ago) 10:34 AM
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20255)

It now works! All previous issues have been fixed.


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.Message ID: <vim/vim/issues/20255/4535042057@github.com>

Christian Brabandt

unread,
1:20 PM (9 hours ago) 1:20 PM
to vim/vim, Subscribed

Closed #20255 as completed via b748f4b.


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.Message ID: <vim/vim/issue/20255/issue_event/25934679052@github.com>

Reply all
Reply to author
Forward
0 new messages