SDL::Event is so broken #165

Closed
kthakore opened this Issue Jul 26, 2011 · 3 comments

Comments

Projects
None yet
1 participant
Owner

kthakore commented Jul 26, 2011

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,
"\n";
});
$app->run;
}}}

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.

Owner

kthakore commented Jul 26, 2011

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

kthakore was assigned Jul 26, 2011

Owner

kthakore commented Jul 26, 2011

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

Owner

kthakore commented Jul 26, 2011

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 closed this Jul 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment