internal void UnsetFullScreen(CarbonWindow window) { Debug.Print("Unsetting AGL fullscreen."); byte code = Agl.aglSetDrawable(ContextHandle, IntPtr.Zero); Agl.CheckReturnValue(code, "aglSetDrawable"); code = Agl.aglUpdateContext(ContextHandle); Agl.CheckReturnValue(code, "aglUpdateContext"); CG.CGDisplayRelease(CG.CGMainDisplayID()); Debug.Print("Resetting drawable."); SetDrawable(window); mIsFullscreen = false; }
public bool TryRestoreResolution(DisplayDevice device) { IntPtr display = displayMap[device]; if (storedModes.ContainsKey(display)) { Debug.Print("Restoring resolution."); CG.CGDisplaySwitchToMode(display, storedModes[display]); CG.CGDisplayRelease(display); displaysCaptured.Remove(display); return(true); } return(false); }