On 10/7/24 12:15 imacarthur wrote:
> On the head of fltk-1.4, building with mingw32 seems to be currently
> breaking, over the new support for mouse buttons 4 and 5, I think.
Thanks, Ian, for the report.
> The same repo., compiled with mingw64 seems to be fine (ditto MSVC).
>
> The crux seems to be that the version of winuser.h shipped with
> mingw32 looks to be pretty old, and in any case appears to be missing
> the definition of GET_XBUTTON_WPARAM.
That's bad. I assume I didn't test with mingw32 :-(
> The actual definition of GET_XBUTTON_WPARAM seems to be:
>
> #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
>
> So I wonder if we can just call HIWORD(wParam) in our code instead
> (perhaps with suitable explanatory comment) to duck this issue with
> winuser,h being out of date?
Since GET_XBUTTON_WPARAM is a macro, would it make sense to define it
ourselves if it is not defined, something like
#ifndef GET_XBUTTON_WPARAM
#define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
#endif
Can you please test if this fixes it in your constellation?
I'll check if I can reproduce the issue on my VM with mingw32...