> While trying to track down cause of STR#2323,
> offhand noticed this code in the cocoaMouseHandler()
> which seemed maybe wrong..? (see '<--')
>
>
> ---- snip
>
> if (etype == NSLeftMouseDown || etype == NSRightMouseDown || etype ==
> NSOtherMouseDown) {
> if (btn == 1) Fl::e_state |= FL_BUTTON1;
> else if (btn == 3) Fl::e_state |= FL_BUTTON2; // <-- should this be
> (btn == 2)?
> else if (btn == 2) Fl::e_state |= FL_BUTTON3; // <-- should this be
> (btn == 3)?
> }
> else if (etype == NSLeftMouseUp || etype == NSRightMouseUp || etype ==
> NSOtherMouseUp) {
> if (btn == 1) Fl::e_state &= ~FL_BUTTON1;
> else if (btn == 3) Fl::e_state &= ~FL_BUTTON2; // <-- should this be
> (btn == 2)?
> else if (btn == 2) Fl::e_state &= ~FL_BUTTON3; // <-- should this be
> (btn == 3)?
> }
> ---- snip
>
> The if() tests seem to not match the FL_BUTTON# macros for mouse buttons 2
> and 3,
> but maybe they should?
Mac OS X knows LeftMouse, RightMouse, and OtherMouse and has them
numbered in this order, for historical reasons I guess.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev