After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143240 - Keyboard modifier state not sent in tablet (extended input device) events on win32
Keyboard modifier state not sent in tablet (extended input device) events on ...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.4.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-26 21:37 UTC by Robert Ögren
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to send key modifiers in tablet button and motion events (3.07 KB, patch)
2004-05-26 22:01 UTC, Robert Ögren
none Details | Review

Description Robert Ögren 2004-05-26 21:37:36 UTC
The button and motion events sent by the win32 tablet code in
gdk/win32/gdkinput-win32.c (_gdk_input_other_event) do not contain the state of
the keyboard modifier keys (shift, ctrl etc) in the state field of the events.
This causes trouble when using a tablet with The GIMP 2.0. In particular, while
using the pen or brush tool and holding down the shift key to draw straight
lines, The GIMP constantly switches between normal mode and line mode because
the motion events sent by the tablet do not contain the GDK_SHIFT_MASK bit in
the state field.

This applies to the gtk-2-4 branch with my patch from bug #143237 applied, using
a Wacom Graphire 3 USB tablet on Windows XP.

A suggested patch that fixes this will be attached shortly.
Comment 1 Robert Ögren 2004-05-26 22:01:16 UTC
Created attachment 28051 [details] [review]
Patch to send key modifiers in tablet button and motion events

I created a new little helper function to get the state of only the keyboard
modifiers. One could call gdk_window_get_pointer (window, NULL, NULL, mods) to
get the modifiers but that function does a lot of unneccesary things and since
the tablet event code is called often (50-100 motion events/second usually) I
did not want to use it. If there are other better ways of getting this
information please tell me. 

Note: The patch from bug #143237 should probably be applied first, as I have
only tested this patch after applying that. This patch is not created using cvs
diff, apply with patch -p1 < gtk-gdk-wintab-keymod.patch in the gtk+/
directory.
Comment 2 Tor Lillqvist 2004-05-27 02:17:23 UTC
Patch applied to HEAD and gtk-2-4.