lewisenator's picture

Problem with WindowState.Fullscreen in OS X

I get this error every time WindowState.Fullscreen is hit.

			case Key.C:
				if (this.WindowState == WindowState.Fullscreen) {
					this.WindowState = WindowState.Normal;
				} else {
					this.WindowState = WindowState.Fullscreen;
				}
				break;
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at OpenTK.Platform.MacOS.CarbonGLNative.SetFullscreen () [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.CarbonGLNative.set_WindowState (WindowState value) [0x00000] in <filename unknown>:0 
  at OpenTK.NativeWindow.set_WindowState (WindowState value) [0x00000] in <filename unknown>:0 
  at Engine.MainClass.KeyboardKeyDown (System.Object sender, OpenTK.Input.KeyboardKeyEventArgs e) [0x00147] in /Users/kenneth/Documents/Projects/Engine/Engine/MainClass.cs:83 
  at OpenTK.Input.KeyboardDevice.set_Item (Key key, Boolean value) [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.CarbonGLNative.ProcessKeyboardEvent (IntPtr inCaller, IntPtr inEvent, EventInfo evt, IntPtr userData) [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.CarbonGLNative.DispatchEvent (IntPtr inCaller, IntPtr inEvent, EventInfo evt, IntPtr userData) [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.Carbon.Application.EventHandler (IntPtr inCaller, IntPtr inEvent, IntPtr userData) [0x00000] in <filename unknown>:0 
  at (wrapper native-to-managed) OpenTK.Platform.MacOS.Carbon.Application:EventHandler (intptr,intptr,intptr)
  at (wrapper managed-to-native) OpenTK.Platform.MacOS.Carbon.API:SendEventToEventTarget (intptr,intptr)
  at OpenTK.Platform.MacOS.Carbon.API.ProcessEvents () [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.Carbon.Application.ProcessEvents () [0x00000] in <filename unknown>:0 
  at OpenTK.Platform.MacOS.CarbonGLNative.ProcessEvents () [0x00000] in <filename unknown>:0 
  at OpenTK.NativeWindow.ProcessEvents (Boolean retainEvents) [0x00000] in <filename unknown>:0 
  at OpenTK.NativeWindow.ProcessEvents () [0x00000] in <filename unknown>:0 
  at OpenTK.GameWindow.Run (Double updates_per_second, Double frames_per_second) [0x00000] in <filename unknown>:0 
  at OpenTK.GameWindow.Run (Double updateRate) [0x00000] in <filename unknown>:0 
  at Engine.MainClass.Main () [0x00011] in /Users/kenneth/Documents/Projects/Engine/Engine/MainClass.cs:227

System Info:
unibody macbook pro running 64bit os x 10.6.2
nvidia 9600gt
2.8 ghz core 2 duo
mono version 2.6.1
opentk version 1.0-beta-2