Recent Linux Modals Change Breaks PopupMenus

Hi there, I think there is an issue with a recent change to how modals are dismissed on Linux.
This now seems to be dismissing PopupMenus if they’re shown in an event callback.

This can be easily replicated by modifying the widgets.h “Drag and Drop” demo like this:

        void itemDropped (const SourceDetails& dragSourceDetails) override
            message = "Items dropped: " + dragSourceDetails.description.toString();
            PopupMenu m;
            m.addItem (1, "Menu Item 1");
            m.addItem (2, "Menu Item 2");
            int res =;
            ignoreUnused (res);

            somethingIsBeingDraggedOver = false;

You’ll notice the menu never appears where as previously it did.

My knowledge of the Linux windowing code is minimal but I think it’s the addition of dismissBlockingModals on line 3477 here that is dismissing the menus. If I comment out lines 3477-3482 the menu appears as expected.

I hope this isn’t too much of a pain as the recent menu dismissal improvements are great!

Thanks for reporting. I’ve added a fix here:

1 Like