[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ab0d7a2 6/7: Allow resizing undecorated frames on macOS (bug#2851
From: |
Alan Third |
Subject: |
master ab0d7a2 6/7: Allow resizing undecorated frames on macOS (bug#28512, bug#31795) |
Date: |
Wed, 22 Dec 2021 15:49:24 -0500 (EST) |
branch: master
commit ab0d7a2b83fbb97788efb3ad1cd5e3b0ed10f7f4
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Allow resizing undecorated frames on macOS (bug#28512, bug#31795)
* src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS):
Remove unused defines.
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Since this is now the only place these defines are used just put them
inline and add NSWindowStyleMaskResizable for undecorated frames on
Cocoa.
---
src/nsterm.m | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 8fdbacf..8428c68 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -453,14 +453,6 @@ ev_modifiers_helper (unsigned int flags, unsigned int
left_mask,
}
-/* These flags will be OR'd or XOR'd with the NSWindow's styleMask
- property depending on what we're doing. */
-#define FRAME_DECORATED_FLAGS (NSWindowStyleMaskTitled \
- | NSWindowStyleMaskResizable \
- | NSWindowStyleMaskMiniaturizable \
- | NSWindowStyleMaskClosable)
-#define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless
-
/* TODO: Get rid of need for these forward declarations. */
static void ns_condemn_scroll_bars (struct frame *f);
static void ns_judge_scroll_bars (struct frame *f);
@@ -8238,10 +8230,17 @@ not_in_argv (NSString *arg)
if (fullscreen)
styleMask = NSWindowStyleMaskBorderless;
else if (FRAME_UNDECORATED (f))
- styleMask = FRAME_UNDECORATED_FLAGS;
+ {
+ styleMask = NSWindowStyleMaskBorderless;
+#ifdef NS_IMPL_COCOA
+ styleMask |= NSWindowStyleMaskResizable;
+#endif
+ }
else
- styleMask = FRAME_DECORATED_FLAGS;
-
+ styleMask = NSWindowStyleMaskTitled
+ | NSWindowStyleMaskResizable
+ | NSWindowStyleMaskMiniaturizable
+ | NSWindowStyleMaskClosable;
self = [super initWithContentRect:
NSMakeRect (0, 0,
- master updated (5b0121b -> ec1312d), Alan Third, 2021/12/22
- master 0f427be 1/7: Simplify NS color handling, Alan Third, 2021/12/22
- master 89749a6 5/7: Make NS toolbar item ID more unique (bug#50160), Alan Third, 2021/12/22
- master 11c0b25 2/7: Further cleanup of NS color code, Alan Third, 2021/12/22
- master 42601d3 4/7: Make NS toolbar use NSString instead of C strings, Alan Third, 2021/12/22
- master ec1312d 7/7: Add native HEIC support on macOS (bug#51381), Alan Third, 2021/12/22
- master ab0d7a2 6/7: Allow resizing undecorated frames on macOS (bug#28512, bug#31795),
Alan Third <=
- master 308ad05 3/7: Fix macfont backend color handling, Alan Third, 2021/12/22