Cocoa: Implement window cascading

Related to #195.
master
Camilla Löwy ago%!(EXTRA string=9 years)
parent 4661315192
commit ecda05af29
  1. 1
      README.md
  2. 1
      src/cocoa_platform.h
  3. 1
      src/cocoa_window.m

@ -129,6 +129,7 @@ information on what to include when reporting a bug.
- [Cocoa] Bugfix: Disabled use of deprecated `CGDisplayModeCopyPixelEncoding` - [Cocoa] Bugfix: Disabled use of deprecated `CGDisplayModeCopyPixelEncoding`
function on macOS 10.12+ function on macOS 10.12+
- [Cocoa] Bugfix: Running in AppSandbox would emit warnings (#816,#882) - [Cocoa] Bugfix: Running in AppSandbox would emit warnings (#816,#882)
- [Cocoa] Bugfix: Windows created after the first were not cascaded (#195)
- [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871) - [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871)

@ -113,6 +113,7 @@ typedef struct _GLFWlibraryNS
short int keycodes[256]; short int keycodes[256];
short int scancodes[GLFW_KEY_LAST + 1]; short int scancodes[GLFW_KEY_LAST + 1];
char* clipboardString; char* clipboardString;
CGPoint cascadePoint;
// Where to place the cursor when re-enabled // Where to place the cursor when re-enabled
double restoreCursorPosX, restoreCursorPosY; double restoreCursorPosX, restoreCursorPosY;
// The window whose disabled cursor mode is active // The window whose disabled cursor mode is active

@ -1025,6 +1025,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
else else
{ {
[window->ns.object center]; [window->ns.object center];
_glfw.ns.cascadePoint = [window->ns.object cascadeTopLeftFromPoint:_glfw.ns.cascadePoint];
if (wndconfig->resizable) if (wndconfig->resizable)
[window->ns.object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; [window->ns.object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];

Loading…
Cancel
Save