GNOME Bugzilla – Bug 732160
menu activation with alt-somekey makes tools stay in "alt-pressed" mode
Last modified: 2016-04-14 23:23:28 UTC
When using the move tool, if you happen to be in layer or path mode, the alt key allows one to "toggle" to selection mode. I've found a case where I can get the ui stuck in selection mode and it won't toggle back to the mode you were coming from. 1. Create a new image 2. Type 'm' to change to Move tool 3. Verify either you are in layer or path mode, not selection mode. 4. Verify the alt key toggles to selection mode and back. 5. Hit 'alt-f' to bring up the file menu. 6. Hit 'esc' to cancel the file menu. 7. The ui stays "stuck" in selection mode. I originally found this out calling out to a script-fu script I had created and placed in one of the menus. Whenever I would run that script by alt-menuitem I'd be left in the "wrong" mode. I've found you can "unstick" the ui if you move the focus out to a different window. I'm on linux, but I did try this once on windows and it appeared to have the same issues.
I think we have this bug reported already - basically, if you have switched to a tool mode (or anything else that switches that way) by a modifier key, then manage to get the input focus moved from the canvas and let go of the modifier, the tool stays in that mode. A quick search found bug 457288, but this is a rather specific case that might not apply here.
Fixed in master: commit 2a31b96f4bdc03389a1e7c4dc2be5402c1b4522f Author: Michael Natterer <mitch@gimp.org> Date: Fri Apr 15 00:17:00 2016 +0100 Bug 732160 - menu activation with alt-somekey makes tools stay... ...in "alt-pressed" mode Menu activation doesn't cause a focus-out becaus menu keyboard grabbing is implemented with a simple gtk_grab_add() (the menu popup never gets the focus). Therefore, the canvas never gets a focus-out event and the pressed modifiers are stuck. Fixed by connecting to "grab-notify" on the canvas, and artificially releasing all modifiers when the canvas is shadowed by a grab. app/display/gimpdisplayshell-tool-events.c | 36 +++++++++++++++++++++++++++++++++++- app/display/gimpdisplayshell-tool-events.h | 4 ++++ app/display/gimpdisplayshell.c | 4 ++++ 3 files changed, 43 insertions(+), 1 deletion(-)