]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commit
fix SDL mouse events processing xen-3.3.0-rc2
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 30 Jul 2008 15:46:30 +0000 (16:46 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 30 Jul 2008 15:46:30 +0000 (16:46 +0100)
commita1e317f6f57a31a9800f3631dc3f09d7a5b90855
tree41b6d19a6ef89888b76233319bd891d01aa9ffc6
parent7632615299b788f5be7a314f29703462a59ec5b0
fix SDL mouse events processing

This fixes SDL mouse events processing:
- GetRelativeMouseState() always returns the last position, so when the
  polling loop gets several mouse events in one go, we would send
  useless 'no move' events, let's avoid that.
- So as to make sure we don't miss any mouse click / double click, we
  should not use GetRelativeMouseState() to get the button state, but
  rather keep records of the button state ourselves (I've requested SDL
  developers to provide it directly in the event in SDL 1.3).
- bev->state doesn't contain the button state but whether the event is a press
  or a release. Use bev->button instead.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
sdl.c