[haiku-commits] Re: haiku: hrev50596 - in src: kits/interface apps/mandelbrot

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 18 Oct 2016 16:42:53 -0400

On Tue, Oct 18, 2016 at 3:07 AM, Stephan Aßmus <superstippi@xxxxxx> wrote:

this is the wrong way to do it, since GetMouse() returns the currently
pressed mouse buttons, not the buttons pressed at the time of the click. If
the user is fast enough releasing the buttons, fMouseButtons will not
contain what you think it contains, resulting in misbehavior. You need to do
it like this:

fMouseButtons = 0;
Window()->CurrentMessage()->FindInt32("buttons", (int32*)&fMouseButtons);

IMHO, from an API point of view, this sucks. But that's what you gotta do.

Ah, thanks, will fix.

-waddlesplash

Other related posts: