Two mouse buttons on OSX + SDL

Hi all,
I am having a little bit of trouble using OSX with two mouse buttons.
To reproduce the problem, all I need to do is this:

  1. Click outside the app window
  2. Click inside the app window with the right mouse button down-- now HOLD the
    right mouse button down
  3. While still holding right mouse down, click inside the app window with the
    left mouse button down.

Now, with even the simplest SDL program, I get a situation where I get no more
SDL mouse events UNLESS I hold the left button down-- so it’s like the whole
framework is in permanent drag mode. It seems like the window got messed up
by too many mouse clicks + confusion over how OSX is reactivating the window.

Does anyone know of a solution to this?