From 34c93a5124b29671d9729e7102f6215535abf8f8 Mon Sep 17 00:00:00 2001 From: Camilla Berglund <elmindreda@elmindreda.org> Date: Mon, 2 Jul 2012 15:24:02 +0200 Subject: [PATCH] Disabled window restoration on Cocoa. --- readme.html | 4 ++++ src/cocoa_window.m | 3 +++ 2 files changed, 7 insertions(+) diff --git a/readme.html b/readme.html index 63334b67..faf6a52e 100644 --- a/readme.html +++ b/readme.html @@ -334,6 +334,7 @@ version of GLFW.</p> <li>[Cocoa] Bugfix: The <code>GLFW_WINDOW_NO_RESIZE</code> window parameter was always zero</li> <li>[Cocoa] Bugfix: The cursor position incorrectly rounded during conversion</li> <li>[Cocoa] Bugfix: Cursor positioning led to nonsensical results for fullscreen windows</li> + <li>[Cocoa] Bugfix: The GLFW window was flagged as restorable</li> <li>[X11] Added support for the <code>GLX_EXT_swap_control</code> extension as an alternative to <code>GLX_SGI_swap_control</code></li> <li>[X11] Added the POSIX <code>CLOCK_MONOTONIC</code> time source as the preferred method</li> <li>[X11] Added dependency on libm, where present</li> @@ -895,6 +896,9 @@ their skills. Special thanks go out to:</p> <li>Glenn Lewis, for helping out with support for the D programming language</li> + <li>Shane Liesegang, for providing a bug fix relating to Cocoa window + restoration</li> + <li>Tristam MacDonald, for his bug reports and feedback on the Cocoa port</li> <li>Hans 'Hanmac' Mackowiak, for the initial implementation of cursor diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 233075a9..3523806a 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -693,6 +693,9 @@ static GLboolean createWindow(_GLFWwindow* window, [window->NS.object setAcceptsMouseMovedEvents:YES]; [window->NS.object center]; + if ([window->NS.object respondsToSelector:@selector(setRestorable)]) + [window->NS.object setRestorable:NO]; + return GL_TRUE; }