Skip to content


Subversion checkout URL

You can clone with
Download ZIP


SDL::Event is so broken #165

kthakore opened this Issue · 3 comments

1 participant


When you run this program:

use SDL;
use SDLx::App;
use SDL::Events;

my $app = SDLx::App->new;
$app->add_event_handler(sub {
my ($e) = @_;
print STDERR "motion_state:", $e->motion_state,
" button_button:", $e->button_button,
" button_which:", $e->button_which,
" button_state:", $e->button_state,

You will notice:

  1. motion_state and button_button ALWAYS return the same value
  2. (Possibly Windows only) a plain mouse move event gives you 0s across the board. If you minimize and the window and then go back to it, mouse move events then give you 4! If you right click, they'll go back to giving you 0 again!

Have a look at these and see if they're binding problems (likely), or just libsdl's fault.


Author: froggs
Time: 1292685746
Field: status
Value: closed

@kthakore kthakore was assigned

Author: froggs
Time: 1292685746
Field: resolution
Value: invalid


Author: froggs
Time: 1292685746
Field: comment
Value: 1) You should never call button_button on a mousemotion event, or motion_state on a mousebutton event.
2) I dont get these 4's on my windows box.

@kthakore kthakore closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.