Dylan Liu
2024-05-03 bdc57c6ec9b08f74ca65a06b8496fbaa3268c5fd
Fix macOS title bar buttons not displaying properly.

In order for macOS windows to display buttons properly, we can't hide macOS native buttons, otherwise the title bar will appear on top of the buttons. The easiest manual solution is to refresh the window's flag, but for convenience, it's better to just not hide it.
1个文件已修改
10 ■■■■■ 已修改文件
src/core/contexts/cocoawindowcontext.mm 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/cocoawindowcontext.mm
@@ -330,13 +330,9 @@
            nswindow.movableByWindowBackground = NO;
            nswindow.movable = NO; // This line causes the window in the wrong position when
                                   // become fullscreen.
            //  For some unknown reason, we don't need the following hack in Qt versions below or
            //  equal to 6.2.4.
#if (QT_VERSION > QT_VERSION_CHECK(6, 2, 4))
            [nswindow standardWindowButton:NSWindowCloseButton].hidden = (visible ? NO : YES);
            [nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = (visible ? NO : YES);
            [nswindow standardWindowButton:NSWindowZoomButton].hidden = (visible ? NO : YES);
#endif
            [nswindow standardWindowButton:NSWindowCloseButton].hidden = NO;
            [nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = NO;
            [nswindow standardWindowButton:NSWindowZoomButton].hidden = NO;
        }
        static void replaceImplementations() {