Created
March 12, 2016 23:30
-
-
Save LRFLEW/5f30731b9863c99f13e4 to your computer and use it in GitHub Desktop.
How to prevent Fullscreen button on OS X Title Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import AppKit; | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_syswm.h> | |
void update_SDL_Window_NSWindow(SDL_Window *win) { | |
SDL_SysWMinfo wmi; | |
SDL_VERSION(&wmi.version); | |
if (SDL_GetWindowWMInfo(win, &wmi)) { | |
switch (wmi.subsystem) { | |
case SDL_SYSWM_COCOA: | |
wmi.info.cocoa.window.collectionBehavior = NSWindowCollectionBehaviorFullScreenAuxiliary; | |
break; | |
default: ; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment