Dismiss CallOutBox disable menu commands shortcuts

Linux / Ubuntu 20.04

When i dismiss a CallOutBox (e.g. by clicking outside), sometimes the commands from the menu bar are not triggered anymore with shortcuts. I have to click again inside to make them working back.

Three days trying to reproduce the bug without success… :unamused:

< Dummy/CallOut at master · nicolasdanet/Dummy · GitHub >

On macOS (dismiss/launch properly trigger with menu command):

On Linux (required to click inside to trigger the menu command again):

Notice that sometimes it works fine also on Linux.

Any clue? I don’t understand what’s going on.

Wayland or X11? Maybe Gnome shell (mutter) focus grab bug.

1 Like

This is standard Ubuntu 20.04 with Gnome and X11.

Tomorrow I’ll try to understand what’s going on with the command manager.
I can not make a minimal exemple able to reproduce the bug.
It makes me nuts.

Sometimes it works ; below how it should behave.

I upgraded to Ubuntu 22.04 and i have exactly the same problem (with Wayland and X11). :woozy_face:

It appears that keyPressed is no more called after that the CallOutBox is dismissed.

Making App on Linux with JUCE is painful ; or i am stupid?

In normal case the key event is properly handled by the content component.

JUCE v7.0.5
RT Enabled

- N4juce18KeyPressMappingSetE
- keyWasUsed 1
keyWasUsed 1

In bad cases (CallOutBox dismissed) the key event is sent only to the window component.

keyWasUsed 0


I should have set the mapping in the top window and not in the top content component. :person_facepalming:

addKeyListener (Spaghettis()->getCommandManager().getKeyMappings());

It seems to work fine now (strange that before it worked on macOS by the way).

Sorry for rant and noise…