Bug - Missing mouse events in windows

I already posted about this back in August (http://forums.libsdl.org/viewtopic.php?t=6485), and it still hasn’t been fixed. I made a patch and everything.


diff -r 0a07d002f10b -r d798b3b114b5 src/video/win32/SDL_win32events.c
— a/src/video/win32/SDL_win32events.c Sat Aug 14 12:28:43 2010 -0700
+++ b/src/video/win32/SDL_win32events.c Sun Aug 15 04:04:07 2010 -0700
@@ -211,6 +211,40 @@
SDL_SendMouseButton(data->window, SDL_RELEASED, SDL_BUTTON_LEFT);

  •    SDL_SendMouseButton(data->window, SDL_PRESSED, SDL_BUTTON_RIGHT);
  •    break;+
  • case WM_RBUTTONUP:
  •    SDL_SendMouseButton(data->window, SDL_RELEASED, SDL_BUTTON_RIGHT);
  •    break;
  •    SDL_SendMouseButton(data->window, SDL_PRESSED, SDL_BUTTON_MIDDLE);
  •    break;
  • case WM_MBUTTONUP:
  •    SDL_SendMouseButton(data->window, SDL_RELEASED, SDL_BUTTON_MIDDLE);
  •    break;
  •    SDL_SendMouseButton(data->window, SDL_PRESSED, SDL_BUTTON_X1 + GET_XBUTTON_WPARAM(wParam) - 1);
  •    returnCode = TRUE;
  •    break;
  • case WM_XBUTTONUP:
  •    SDL_SendMouseButton(data->window, SDL_RELEASED, SDL_BUTTON_X1 + GET_XBUTTON_WPARAM(wParam) - 1);
  •    returnCode = TRUE;
  •    break;
  •    {
  •        int motion = (short) HIWORD(wParam);
  •        SDL_SendMouseWheel(data->window, 0, motion);
  •        break;
  •    }
    if (SDL_GetMouseFocus() == data->window) {

This patch is for a much older revision, but it should still work on the current revision.

Off-topic, I really disapprove of the forum automatically putting my posts on the mailing list. Ever since I made that post, I started getting mild amounts of spam in my e-mail account, where I had never gotten any before.

I am checking every single day since you posed your patch here if it was pushed already. Just some time ago: http://forums.libsdl.org/viewtopic.php?t=6625

Frankly this has become ridiculous. I now start to consider SDL 1.3 unmaintained and looking for alternative after over a year developing project with it which I guess don’t have to say is a real pita.

And I tottaly agree with you on forum -> mailing list part too. Thing is SDL forums is in practice inexistent. There are no mods, no real topics or anything and SDL (at least 1.3) deserves a real forum imho.

Im with you guys, i also had problem with this and used your patch Jcw87 a couple of days ago. thanks and when noticing the date of the patch i was blown disappointed that sdl still hasnt fixed this extremely simple bug