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
Hello!
RT Enabled

N10spaghettis13EditComponentE
handleKeyPress
N10spaghettis13EditComponentE
- N4juce18KeyPressMappingSetE
- keyWasUsed 1
N4juce10TextEditorE
handleKeyPress
N4juce10TextEditorE
keyWasUsed 1

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

###
N10spaghettis10EditWindowE
handleKeyPress
N10spaghettis10EditWindowE
keyWasUsed 0
N10spaghettis10EditWindowE

Shutdown
Goodbye!

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…