• R/O
  • HTTP
  • SSH
  • HTTPS

hengbandosx: Commit

The master and develop branches track hengband.

OS X development happens on the macos-1-6-2, macos-2-2-1, and macos-develop branches.


Commit MetaInfo

Revisiondc902631e5115d6b8fed8f3b6c12bf28dd161533 (tree)
Time2020-02-29 06:39:38
AuthorEric Branlund <ebranlund@fast...>
CommiterEric Branlund

Log Message

Create the Angband terminals other than terminal zero as utility panels: makes the title bar thinner. Also implies some other behavioral changes which are not inconsistent with how those terminals are used. Addresses the hengbandforosx's ticket 40204.

Change Summary

Incremental Difference

--- a/src/main-cocoa.m
+++ b/src/main-cocoa.m
@@ -1989,13 +1989,25 @@ static __strong NSFont* gDefaultFont = nil;
19891989
19901990 NSUInteger styleMask = NSTitledWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask;
19911991
1992- /* Make every window other than the main window closable */
1992+ /*
1993+ * Make every window other than the main window closable, also create
1994+ * them as utility panels to get the thinner title bar and other
1995+ * attributes that already match up with how those windows are used.
1996+ */
19931997 if ((__bridge AngbandContext*) (angband_term[0]->data) != self)
19941998 {
1995- styleMask |= NSClosableWindowMask;
1996- }
1999+ self.primaryWindow =
2000+ [[NSPanel alloc] initWithContentRect:contentRect
2001+ styleMask:(styleMask | NSClosableWindowMask |
2002+ NSUtilityWindowMask)
2003+ backing:NSBackingStoreBuffered defer:YES];
2004+ } else {
2005+ self.primaryWindow =
2006+ [[NSWindow alloc] initWithContentRect:contentRect
2007+ styleMask:styleMask
2008+ backing:NSBackingStoreBuffered defer:YES];
2009+ }
19972010
1998- self.primaryWindow = [[NSWindow alloc] initWithContentRect:contentRect styleMask: styleMask backing:NSBackingStoreBuffered defer:YES];
19992011
20002012 /* Not to be released when closed */
20012013 [self.primaryWindow setReleasedWhenClosed:NO];
Show on old repository browser