Skip to content

Commit 95806e9

Browse files
authored
[222_56] Fix missing macOS tiling menu options on zoom button (#2983)
1 parent f008f09 commit 95806e9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

3rdparty/qwindowkitty/src/core/contexts/cocoawindowcontext.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ bool setBlurEffect(BlurMode mode) {
332332
// System title bar
333333
void setSystemTitleBarVisible(const bool visible) {
334334
auto nswindow = [nsview window];
335+
[nswindow setCollectionBehavior:[nswindow collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
335336
if (!nswindow) {
336337
return;
337338
}
@@ -348,8 +349,6 @@ void setSystemTitleBarVisible(const bool visible) {
348349
nswindow.hasShadow = YES;
349350
// nswindow.showsToolbarButton = NO;
350351
nswindow.movableByWindowBackground = NO;
351-
nswindow.movable = NO; // This line causes the window in the wrong position when
352-
// become fullscreen.
353352
[nswindow standardWindowButton:NSWindowCloseButton].hidden = NO;
354353
[nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = NO;
355354
[nswindow standardWindowButton:NSWindowZoomButton].hidden = NO;

devel/222_56.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# #2771 Fix missing macOS tiling menu options on zoom button
2+
3+
### What
4+
Restores the native macOS tiling hover menu (including "Move & Resize", "Fill & Arrange", and "Enter Full Screen") when hovering over the window's green zoom button.
5+
6+
### Why
7+
The window was explicitly marked as non-movable (`nswindow.movable = NO`), which caused macOS to disable part of the native window-management menu. In addition, the window was not explicitly marked as participating in Split View.
8+
9+
### How
10+
Updated `3rdparty/qwindowkitty/src/core/contexts/cocoawindowcontext.mm`:
11+
12+
1. Removed `nswindow.movable = NO`.
13+
2. Added `NSWindowCollectionBehaviorFullScreenPrimary` to the window's collection behavior so it participates in macOS Split View and tiling.

0 commit comments

Comments
 (0)