[Bug] No event for right mouse button on Mac OS X

Hi,

I just compiled the latest SDL 2.0 from hg tip and I’ve noticed that
the right mouse button does not send an event when using it on Mac OS
X.

I compiled for Mac OS X 10.6 x86_64 using the provided Xcode project.
I’ve confirmed on two separate systems.

Would this be a regression? I found this commit a while back:

However, this occurs in both fullscreen and windowed mode

D

I agree.

I reported this about a month ago and nobody responded :slight_smile:

It’s something to do with cocoa views and the different defaults for event propagation between left and right clicks but I’m no cocoa programmer and I don’t follow it; it seems like there is some code in cocoawindow.m which intends to fix this, see the comment:

@interface SDLView : NSView
/* The default implementation doesn’t pass rightMouseDown to responder chain */

… but the workaround apparently doesn’t work.

Before we switched to SDL2.0 I was using the hg version of SDL1.3 and it definitely worked back then.On 14 Sep 2012, at 05:15, D B wrote:

Hi,

I just compiled the latest SDL 2.0 from hg tip and I’ve noticed that
the right mouse button does not send an event when using it on Mac OS
X.

I compiled for Mac OS X 10.6 x86_64 using the provided Xcode project.
I’ve confirmed on two separate systems.

Would this be a regression? I found this commit a while back:

http://hg.libsdl.org/SDL/rev/ed5f117c949d

However, this occurs in both fullscreen and windowed mode

D


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi Julian,On Fri, Sep 21, 2012 at 5:04 PM, Julian Bean wrote:

I agree.

I reported this about a month ago and nobody responded :slight_smile:

It’s something to do with cocoa views and the different defaults for event propagation between left and right clicks but I’m no cocoa programmer and I don’t follow it; it seems like there is some code in cocoawindow.m which intends to fix this, see the comment:

@interface SDLView : NSView
/* The default implementation doesn’t pass rightMouseDown to responder chain */

… but the workaround apparently doesn’t work.

Before we switched to SDL2.0 I was using the hg version of SDL1.3 and it definitely worked back then.

I tried testgl2 yesterday on Mac OS X 10.8 and it worked just fine.

  • Jiang

I also compiled it for 10.8 and it works fine for me. Maybe it’s an issue with 10.6? Anyone try in on 10.7? Anyone have it work ok in 10.6?

Using the SDL 2.0 snapshot downloaded September 1st, the right click
does not work with 10.4 (I always use old stuff for testing ;-), but
SDL 1.X works fine.

Greetings,
ElmarOn 09/21/2012 05:26 PM, Trev wrote:

I also compiled it for 10.8 and it works fine for me. Maybe it’s an
issue with 10.6? Anyone try in on 10.7? Anyone have it work ok in 10.6?

I also compiled it for 10.8 and it works fine for me. Maybe it’s an
issue with 10.6? Anyone try in on 10.7? Anyone have it work ok in 10.6?

Using the SDL 2.0 snapshot downloaded September 1st, the right click does not work with 10.4 (I always use old stuff for testing ;-), but SDL 1.X works fine.

Very interesting. Thanks all.

I am indeed using 10.6 just like the OP in this thread.

I suppose an interesting question is - would gltest2 compiled using 10.8 using the compatibility SDKs work on 10.6?

But more importantly does anybody understand what change in the SDKs causes this?

JulesOn 21 Sep 2012, at 18:11, Elmar Krieger wrote:

On 09/21/2012 05:26 PM, Trev wrote: