mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 20:11:58 +00:00
parent
6123937bde
commit
67eadf1e97
@ -71,6 +71,8 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
||||
- Removed all mention of GLU in examples, build files and package dependencies
|
||||
- Bugfix: Initialization failed on headless systems
|
||||
- Bugfix: The cached current context could get out of sync
|
||||
- Bugfix: `glfwIconifyWindow` did not restore the original video mode for full
|
||||
screen windows created with `GLFW_AUTO_ICONIFY`
|
||||
- [Win32] Renamed hybrid GPU override compile-time option to
|
||||
`_GLFW_USE_HYBRID_HPG` and added support for AMD PowerXpress systems
|
||||
- [Win32] Bugfix: `glfwGetVideoModes` included unusable modes on some systems
|
||||
|
@ -234,19 +234,22 @@ static int translateKey(unsigned int key)
|
||||
|
||||
- (void)windowDidMiniaturize:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor)
|
||||
leaveFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_TRUE);
|
||||
}
|
||||
|
||||
- (void)windowDidDeminiaturize:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_FALSE);
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor && window->autoIconify)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
if (_glfw.cursorWindow == window &&
|
||||
window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
{
|
||||
@ -260,7 +263,7 @@ static int translateKey(unsigned int key)
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor && window->autoIconify)
|
||||
leaveFullscreenMode(window);
|
||||
_glfwPlatformIconifyWindow(window);
|
||||
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
}
|
||||
@ -885,9 +888,6 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||
if (wndconfig->monitor)
|
||||
{
|
||||
[window->ns.object setLevel:NSMainMenuWindowLevel + 1];
|
||||
|
||||
if (window->autoIconify)
|
||||
[window->ns.object setHidesOnDeactivate:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -280,9 +280,6 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
if (window->cursorMode != GLFW_CURSOR_NORMAL)
|
||||
_glfwPlatformApplyCursorMode(window);
|
||||
|
||||
if (window->monitor && window->autoIconify)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowFocus(window, GL_TRUE);
|
||||
return 0;
|
||||
}
|
||||
@ -293,10 +290,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
restoreCursor(window);
|
||||
|
||||
if (window->monitor && window->autoIconify)
|
||||
{
|
||||
_glfwPlatformIconifyWindow(window);
|
||||
leaveFullscreenMode(window);
|
||||
}
|
||||
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
return 0;
|
||||
@ -523,12 +517,18 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
if (!window->win32.iconified && wParam == SIZE_MINIMIZED)
|
||||
{
|
||||
window->win32.iconified = GL_TRUE;
|
||||
if (window->monitor)
|
||||
leaveFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_TRUE);
|
||||
}
|
||||
else if (window->win32.iconified &&
|
||||
(wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED))
|
||||
{
|
||||
window->win32.iconified = GL_FALSE;
|
||||
if (window->monitor)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_FALSE);
|
||||
}
|
||||
|
||||
|
@ -1256,9 +1256,6 @@ static void processEvent(XEvent *event)
|
||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
disableCursor(window);
|
||||
|
||||
if (window->monitor && window->autoIconify)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowFocus(window, GL_TRUE);
|
||||
return;
|
||||
}
|
||||
@ -1280,10 +1277,7 @@ static void processEvent(XEvent *event)
|
||||
restoreCursor(window);
|
||||
|
||||
if (window->monitor && window->autoIconify)
|
||||
{
|
||||
_glfwPlatformIconifyWindow(window);
|
||||
leaveFullscreenMode(window);
|
||||
}
|
||||
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
return;
|
||||
@ -1302,10 +1296,20 @@ static void processEvent(XEvent *event)
|
||||
{
|
||||
const int state = getWindowState(window);
|
||||
if (state == IconicState)
|
||||
{
|
||||
if (window->monitor)
|
||||
leaveFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_TRUE);
|
||||
}
|
||||
else if (state == NormalState)
|
||||
{
|
||||
if (window->monitor)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user