GTK4: how to make auto-hide the submenu when the pointer passed through

Hello,

I’m encountering an issue in GTK4 when adding a menu bar to my window.
My menu structure looks like this:

File

    Open

    Save

    Close

    —

    Exit

Edit

    Cut

    Copy

    Paste

    Color

        Red

        Green

        Blue

    [ ] Auto

The problem occurs in the Edit → Color submenu:
when the pointer hovers over Color, the submenu opens automatically (as expected), but it remains visible even after the pointer moves away, instead of hiding when the user leaves the menu item.

How can I make the submenu auto‑hide when the pointer leaves the parent menu item?

Thank you in advance for your help.

Hi,

Which gtk4 version exactly?

It was already reported here and fixed in gtk-4.18.

If your gtk version is older, then you may have to ask your distribution to backport the patch.