GNOME Bugzilla – Bug 345726
Release of Alt not correctly detected (eraser, move and scale tools)
Last modified: 2006-06-27 14:20:23 UTC
If you press Alt to get the anti-erase mode in the eraser tool, this mode gets stuck even after releasing Alt. So if you press Alt, release it, and then click and move the mouse, this will be in anti-erase mode. It looks like the release of Alt is only considered when the mouse button is released, when the cursor enters/leaves the image window, or when the state of another modifier changes. Other tools treat the modifiers correctly. For example, Ctrl in the blur/sharpen (convolve) tool or in the dodge/burn tool. These tools ignore changes in modifier state while drawing, but not before. This bug is present in current CVS and also in the 2.2.x branch.
The tools don't ignore the changes in modifier state while drawing, the current tool framework doesn't allow them to catch changes to the modifier state while drawing. This will have to change for 2.4 as it is a prerequisite for a proper implementation of the new selection tools.
I cannot reproduce this problem. Perhaps your window manager is doing something wrong and the release event never gets to GIMP? Does the check-box in the tool options change or is that affected as well?
The checkbox remains checked and the cursor still shows the "-" sign. It could be metacity doing something strange, although I'm not sure about that.
Additional info: I tried "xev" and it shows both the KeyPress and KeyRelease events when I press and release Alt. I doubt that metacity is doing something strange only for GIMP but behaves correctly for xev and other applications.
Even more info: - In 2.2.x, the scale tool is also affected (Alt = Keep width). - In both 2.2.x and current CVS, the move tool and the path tool are also affected (Alt = move selection for the move tool, Alt = move mode for the path tool).
Sorry, it looks like this problem may be related to the Linux or X keyboard driver rather than GIMP or any other application. Trying "xev" again showed me that different keysyms are returned for the KeyPress and KeyRelease events when I press and release Alt: KeyPress event, serial 29, synthetic NO, window 0x3200001, root 0x76, subw 0x0, time 12327096, (73,109), root:(83,174), state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 29, synthetic NO, window 0x3200001, root 0x76, subw 0x0, time 12327362, (73,109), root:(83,174), state 0x8, keycode 64 (keysym 0xfe0a, ISO_Prev_Group), same_screen YES, XLookupString gives 0 bytes: This should never happen so it is not surprising that GIMP is confused. I am closing this bug as NOTGNOME.
Closing as NOTGNOME was not the best resolution because this bug seems to be triggered by a GNOME application. I submitted a new bug report against control-center / keyboard properties, with a more appropriate description of the problem. *** This bug has been marked as a duplicate of 346029 ***