internal/ui: bug fix: collectionBehavior mattered for fullscreen

Closes #2238
This commit is contained in:
Hajime Hoshi 2022-08-10 01:06:24 +09:00
parent 205245b094
commit a84a738360

View File

@ -147,13 +147,13 @@ package ui
// //
// // Even though EbitenWindowDelegate is used, this hack is still required. // // Even though EbitenWindowDelegate is used, this hack is still required.
// // toggleFullscreen doesn't work when the window is not resizable. // // toggleFullscreen doesn't work when the window is not resizable.
// bool origResizable = window.styleMask & NSWindowStyleMaskResizable; // bool origFullscreen = window.collectionBehavior & NSWindowCollectionBehaviorFullScreenPrimary;
// if (!origResizable) { // if (!origFullscreen) {
// window.styleMask |= NSWindowStyleMaskResizable; // window.collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
// } // }
// [window toggleFullScreen:nil]; // [window toggleFullScreen:nil];
// if (!origResizable) { // if (!origFullscreen) {
// window.styleMask &= ~NSWindowStyleMaskResizable; // window.collectionBehavior &= ~NSWindowCollectionBehaviorFullScreenPrimary;
// } // }
// } // }
// //