Problem with Menus, Cursors, Linux, with patch that solves

Hi!

We got the following bug report

Using the Cinnamon 5.0.7 desktop on Manjaro Linux, after respectively left- or right-clicking on the Surge XT patch browser rectangle or another component that can open a menu, then clicking outside the focus of the Surge XT window instead of clicking on a menu item or pressing ESC, the mouse pointer will show undefined behavior either regarding pointing mode or visibility.

over in this issue Clicking outside of Surge XT window with open menus can lead to undefined mouse focus behavior · Issue #5692 · surge-synthesizer/surge · GitHub

One of the members of the team spent a bit of time on it and concluded if he adds to bool windowIsStillValid() the following in JUCE/juce_PopupMenu.cpp at master · juce-framework/JUCE · GitHub

        if (doesAnyJuceCompHaveFocus() == false)
        {
            dismissMenu (nullptr);
            return false;
        }

then the reported problem is gone while the menu functions still work. And he doesn’t have a forum account so I figured I would bring it over here for you all!

Thanks

1 Like