Touchpad press not reflected in buttons state

Hi,

once a mouse button is pressed the state “mouse button pressed” is reflected
in an internal SDL variable (SDL_ButtonState) which can be requested by
SDL_GetMouseState() or SDL_GetRelativeMouseState(). The return value of these
functions is a value which contain bits for each mouse button pressed at the
time these functions are called. This works fine for normal mouse buttons but
if I press the touchpad and get an SDL_MOUSEBUTTONDOWN event, the return value
of SDL_GetMouseState() is zero.

Tested here on my Thinkpad running Xorg 7.0 on Debian/unstable and using
SDL 1.2.10-3.

Frank–

Dept. of Computer Science, Dresden University of Technology, Germany

http://os.inf.tu-dresden.de/~fm3

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060616/3b443a83/attachment.pgp

I’m guessing you don’t have tap to click enabled for your touchpad.On Friday 16 June 2006 04:59, Frank Mehnert wrote:

Hi,

once a mouse button is pressed the state “mouse button pressed” is
reflected in an internal SDL variable (SDL_ButtonState) which can be
requested by SDL_GetMouseState() or SDL_GetRelativeMouseState(). The return
value of these functions is a value which contain bits for each mouse
button pressed at the time these functions are called. This works fine for
normal mouse buttons but if I press the touchpad and get an
SDL_MOUSEBUTTONDOWN event, the return value of SDL_GetMouseState() is zero.

Tested here on my Thinkpad running Xorg 7.0 on Debian/unstable and using
SDL 1.2.10-3.


Patrick McFarland || www.AdTerrasPerAspera.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." – Kristian Wilson, Nintendo,
Inc, 1989

I don’t address my touchpad in my /etc/X11/xorg.conf configuration but
tap-to-click works: I get the appropriate X events (verified with xev),
tapping a window selects the window, and tapping twice into a konsole
window selects the whole word. And as I already wrote, I event get the
SDL_MOUSEBUTTONDOWN/-UP event when tapping the touchpad.

FrankOn Monday 19 June 2006 09:05, Patrick McFarland wrote:

On Friday 16 June 2006 04:59, Frank Mehnert wrote:

Hi,

once a mouse button is pressed the state “mouse button pressed” is
reflected in an internal SDL variable (SDL_ButtonState) which can be
requested by SDL_GetMouseState() or SDL_GetRelativeMouseState(). The
return value of these functions is a value which contain bits for each
mouse button pressed at the time these functions are called. This works
fine for normal mouse buttons but if I press the touchpad and get an
SDL_MOUSEBUTTONDOWN event, the return value of SDL_GetMouseState() is
zero.

Tested here on my Thinkpad running Xorg 7.0 on Debian/unstable and using
SDL 1.2.10-3.

I’m guessing you don’t have tap to click enabled for your touchpad

Dept. of Computer Science, Dresden University of Technology, Germany

http://os.inf.tu-dresden.de/~fm3

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060619/d2730ec7/attachment.pgp

I would venture a guess that the tap-to-click transforms a tap into two
events (DOWN+UP) that immediately follow each other. The event processing is
usually asynchronous and so somewhat delayed, and SDL_GetMouseState is
returning the immediate mouse state. So at the time you call
SDL_GetMouseState, the “button” is already up.

-Alex.> On Friday 16 June 2006 04:59, Frank Mehnert wrote:

Hi,

once a mouse button is pressed the state “mouse button pressed” is
reflected in an internal SDL variable (SDL_ButtonState) which can be
requested by SDL_GetMouseState() or SDL_GetRelativeMouseState(). The
return value of these functions is a value which contain bits for
each mouse button pressed at the time these functions are called.
This works fine for normal mouse buttons but if I press the touchpad
and get an SDL_MOUSEBUTTONDOWN event, the return value of
SDL_GetMouseState() is zero.

Tested here on my Thinkpad running Xorg 7.0 on Debian/unstable and
using SDL 1.2.10-3.