Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blueshogun96

macrumors regular
Original poster
Nov 24, 2012
112
3
I've written a cross platform game that uses [free]glut for a faux fullscreen mode. Since the controls are completely mouse controlled, it's easy to hit one of the hot corners and cause the window to be taken out of focus or off the screen altogether. This was embarrassing when I took my game to a coding competition and users would sometimes hit a hotcorner unknowingly causing them to get confused.

Can they be pragmatically and temporarily disabled through code? Preferrably C++ or Obj-C. I've done some searching, and haven't found anything so far. Any ideas?

Thanks,

shogun.
 
What if my game doesn't use a .xib file? GLUT takes care of all the windowing stuff for me so I don't believe I have access to that.

Shogun
 
What if my game doesn't use a .xib file? GLUT takes care of all the windowing stuff for me so I don't believe I have access to that.

Shogun

Are GLUT windows templates stored in resource files? Does GLUT give you access to the window objects and their attributes?
 
Are GLUT windows templates stored in resource files? Does GLUT give you access to the window objects and their attributes?
With GLUT (at least in freeglut), the window is generated purely through code. Afaik, I cannot see any way to access the window objects.

Shogun
 
Googling GLUT, and GLUT window management, it looks like in order to make it cross-platform, they gave you very limited GUI functionality.
 
http://apple.stackexchange.com/ques...corners-when-playing-games-or-other-such-full

This is a quite old question, but I stumbled on it looking for the same thing (although on ML). The script looks interesting, but it's a bit far-fetched for me, I was looking for something simpler and preferably without add-ons.

This is what I found and works for me: in the hot corner's pref pane, hold Command, Option, Control and/or Shift after clicking a drop down list of a hot corner and you can add one or any combination of the modifier keys to a hot corner trigger. This way, they only work if and when you hold that(those) key(s) which you probably won't during a game, or any full screen app.

I'm pretty sure this works on all OS X versions.

 
Googling GLUT, and GLUT window management, it looks like in order to make it cross-platform, they gave you very limited GUI functionality.
Unfortunately yes. At least with Windows there's a function called GetActiveWindow(). Is there an equivalent for Mac?

Shogun.
 
http://apple.stackexchange.com/ques...corners-when-playing-games-or-other-such-full

This is a quite old question, but I stumbled on it looking for the same thing (although on ML). The script looks interesting, but it's a bit far-fetched for me, I was looking for something simpler and preferably without add-ons.

This is what I found and works for me: in the hot corner's pref pane, hold Command, Option, Control and/or Shift after clicking a drop down list of a hot corner and you can add one or any combination of the modifier keys to a hot corner trigger. This way, they only work if and when you hold that(those) key(s) which you probably won't during a game, or any full screen app.

I'm pretty sure this works on all OS X versions.
Helpful, but unfortunately, not a direct pragmatic solution. Unless there's a way I can execute that script from C++ code? If that's possible then I could likely create a customized solution that way.

Shogun.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.