SDL_QuartzWM patches

I’ve sent in two small patches to SDL_QuartzWM directly to Sam over the
past few months (well, I think I sent both anyway) and neither of them
have been implemented. I didn’t receive a response, so I’m sure he was
just busy and/or they got lost, so I decided to sign up to the list and
post them here.

This patch rolls both of them together:

  • Mouse cursor becomes visible if hidden when it moves outside of the
    game window. If you want it to stay invisible you should warp it
    because if it’s not warped a user might click some random other
    application! Commercial games behave in this way (or at least Warcraft
    III does, which is the only one that uses a custom mouse cursor and no
    warping that I’ve played in recent memory).
  • Right mouse button emulation is changed from Command-Click to
    Control-Click, which is how OS X behaves.

Consider copyright assigned to whomever needs it under whichever
license it needs to be under… yadda yadda yadda.

-bob

-------------- next part --------------
A non-text attachment was scrubbed…
Name: 20040511-1-SDL_QuartzWM_MacLike.patch
Type: application/octet-stream
Size: 1948 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040511/e75e31cc/attachment.obj

I’ve sent in two small patches to SDL_QuartzWM directly to Sam over the
past few months (well, I think I sent both anyway) and neither of them
have been implemented. I didn’t receive a response, so I’m sure he was
just busy and/or they got lost, so I decided to sign up to the list and
post them here.

Thanks, I’ve applied them to CVS. Sorry I didn’t respond earlier, I’ve
been busy. :slight_smile:

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I’ve sent in two small patches to SDL_QuartzWM directly to Sam over
the
past few months (well, I think I sent both anyway) and neither of them
have been implemented. I didn’t receive a response, so I’m sure he
was
just busy and/or they got lost, so I decided to sign up to the list
and
post them here.

Thanks, I’ve applied them to CVS. Sorry I didn’t respond earlier, I’ve
been busy. :slight_smile:

Hm, I am not sure I exactly agree with that patch being applied. In
particular:

Right mouse button emulation is changed from Command-Click to
Control-Click, which is how OS X behaves.

While it’s true that on the one hand OS uses nowadays Ctrl-Click for
this, on the other hand we have:

  • all SDL games on MacOS and Mac OS X used Cmd-Click so far; if
    developers update to a newer SDL (1.2.8), the behavior of their apps
    would suddenly change. I don’t like breaking backward compatibility in
    such a way, even if it means to be a bit more in line with the current
    OS behavior (note that the SDL way predates OS X by a long time :-).

  • At least in my experience, most people other than developers don’t
    even know about Ctrl-Click anyway. For them, learning to use that combo
    isn’t any easier/harder than the other. In fact, only people who (a)
    know about the “right mouse button is ctrl-click” and (b) know that a
    given feature is to be controlled by the right mouse button, will even
    think about using Ctrl-Click. The others hopefully will read in your
    manual/README “To activate feature FOOBAR, press Cmd-Click”.

  • OTOH, those very same people will be very frustrated if the next
    update suddenly changes the combo

  • Many other games use the Cmd-Click convention (which BTW was a
    central reason for the original SDL implementation, I think). E.g.
    virtually all Blizzard games, including StarCraft, Diablo II and
    WarCraft

  • A historic reason for Cmd was, BTW, that for a very long time, not
    all Mac keyboards even had a ctrl key :-).

In short: in my eyes, the motivation to change to Ctrl-click is rather
small (I even agree with it from a purists view, and would support it,
were it a new/obscure feature; as it is, that’s not the case). OTOH I
see a lot of potential irritation with customers coming up…

Bye,

MaxAm 17.05.2004 um 02:16 schrieb Sam Lantinga:

Yo folks, hi Sam!

Another hefty drawback of this patch is that it rendered CVS
uncompilable on OS X. It makes use of cursor_hidden, a variable which
has been removed some time ago. Reading through the patch’s
description, it appears that it attempts to add auto-unhiding of the
mouse cursor when it leaves the window – something I’ve implemented
some time ago, and which is in fact part of 1.2.7. I am not sure if Bob
just wasn’t aware of this, or if the patch is supposed to add some
other novel feature which I don’t understand, but in any case, it would
seem best at this point to reverse the patch.

Cheers,

Max

Yo folks, hi Sam!

Another hefty drawback of this patch is that it rendered CVS
uncompilable on OS X. It makes use of cursor_hidden, a variable which
has been removed some time ago. Reading through the patch’s
description, it appears that it attempts to add auto-unhiding of the
mouse cursor when it leaves the window – something I’ve implemented
some time ago, and which is in fact part of 1.2.7. I am not sure if Bob
just wasn’t aware of this, or if the patch is supposed to add some
other novel feature which I don’t understand, but in any case, it would
seem best at this point to reverse the patch.

Done, sorry for not checking the patch more closely.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Another hefty drawback of this patch is that it rendered CVS
uncompilable on OS X. It makes use of cursor_hidden, a variable which
has been removed some time ago. Reading through the patch’s
description, it appears that it attempts to add auto-unhiding of the
mouse cursor when it leaves the window – something I’ve implemented
some time ago, and which is in fact part of 1.2.7. I am not sure if
Bob just wasn’t aware of this, or if the patch is supposed to add some
other novel feature which I don’t understand, but in any case, it
would seem best at this point to reverse the patch.

Sorry about that. I’m not sure how I got out of sync and missed it.
Obviously I’ve wanted this behavior for a long time :slight_smile:

-bob
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040518/2e739a52/attachment.binOn May 17, 2004, at 6:47 PM, Max Horn wrote: