Cocoa: Remove double resize of full screen window

Related to #1085.
master
Camilla Löwy ago%!(EXTRA string=8 years)
parent 9903f88947
commit 8b81a03a5a
  1. 1
      README.md
  2. 24
      src/cocoa_window.m

@ -244,6 +244,7 @@ information on what to include when reporting a bug.
notification was shown (#971,#1028) notification was shown (#971,#1028)
- [Cocoa] Bugfix: Some characters did not repeat due to Press and Hold (#1010) - [Cocoa] Bugfix: Some characters did not repeat due to Press and Hold (#1010)
- [Cocoa] Bugfix: Window title was lost when full screen or undecorated (#1082) - [Cocoa] Bugfix: Window title was lost when full screen or undecorated (#1082)
- [Cocoa] Bugfix: Window was resized twice when entering full screen (#1085)
- [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts - [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts
- [WGL] Added support for `WGL_ARB_create_context_no_error` - [WGL] Added support for `WGL_ARB_create_context_no_error`
- [GLX] Added support for `GLX_ARB_create_context_no_error` - [GLX] Added support for `GLX_ARB_create_context_no_error`

@ -1385,37 +1385,21 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
[window->ns.object setStyleMask:styleMask]; [window->ns.object setStyleMask:styleMask];
[window->ns.object makeFirstResponder:window->ns.view]; [window->ns.object makeFirstResponder:window->ns.view];
NSRect contentRect;
if (monitor) if (monitor)
{ {
GLFWvidmode mode; [window->ns.object setLevel:NSMainMenuWindowLevel + 1];
[window->ns.object setHasShadow:NO];
_glfwPlatformGetVideoMode(window->monitor, &mode);
_glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
contentRect = NSMakeRect(xpos, transformY(ypos + mode.height), acquireMonitor(window);
mode.width, mode.height);
} }
else else
{ {
contentRect = NSMakeRect(xpos, transformY(ypos + height), NSRect contentRect = NSMakeRect(xpos, transformY(ypos + height),
width, height); width, height);
}
NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect
styleMask:styleMask]; styleMask:styleMask];
[window->ns.object setFrame:frameRect display:YES]; [window->ns.object setFrame:frameRect display:YES];
if (monitor)
{
[window->ns.object setLevel:NSMainMenuWindowLevel + 1];
[window->ns.object setHasShadow:NO];
acquireMonitor(window);
}
else
{
if (window->numer != GLFW_DONT_CARE && if (window->numer != GLFW_DONT_CARE &&
window->denom != GLFW_DONT_CARE) window->denom != GLFW_DONT_CARE)
{ {

Loading…
Cancel
Save