From e18f87918e7c7dfeb4f5bdda2ba7b427afc8a592 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 12 Nov 2013 14:10:32 -0700 Subject: [PATCH] racket/gui cocoa: fix 'resize-border style for `dialog%` Also, fix documentation to reflect windo styles of different Mac OS X versions. --- .../gui-doc/scribblings/gui/dialog-class.scrbl | 6 +++--- .../gui-pkgs/gui-doc/scribblings/gui/frame-class.scrbl | 4 ++-- .../scribblings/gui/grow-box-spacer-pane-class.scrbl | 4 ++-- pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt | 10 +++++++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/gui-pkgs/gui-doc/scribblings/gui/dialog-class.scrbl b/pkgs/gui-pkgs/gui-doc/scribblings/gui/dialog-class.scrbl index 11faa431bf..57226098f2 100644 --- a/pkgs/gui-pkgs/gui-doc/scribblings/gui/dialog-class.scrbl +++ b/pkgs/gui-pkgs/gui-doc/scribblings/gui/dialog-class.scrbl @@ -60,9 +60,9 @@ The @racket[style] flags adjust the appearance of the dialog on some @item{@racket['no-caption] --- omits the title bar for the dialog (Windows)} - @item{@racket['resize-border] --- adds a resizeable border - around the window (Windows) or grow box in the bottom right corner - (Mac OS X)} + @item{@racket['resize-border] --- adds a resizeable border around the + window (Windows), ability to resize the window (Mac OS X), or grow + box in the bottom right corner (older Mac OS X)} @item{@racket['no-sheet] --- uses a movable window for the dialog, even if a parent window is provided (Mac OS X)} diff --git a/pkgs/gui-pkgs/gui-doc/scribblings/gui/frame-class.scrbl b/pkgs/gui-pkgs/gui-doc/scribblings/gui/frame-class.scrbl index 950aaf07fc..ee8ee3c324 100644 --- a/pkgs/gui-pkgs/gui-doc/scribblings/gui/frame-class.scrbl +++ b/pkgs/gui-pkgs/gui-doc/scribblings/gui/frame-class.scrbl @@ -58,8 +58,8 @@ some platforms: @itemize[ @item{@racket['no-resize-border] --- omits the resizeable border - around the window (Windows, Unix) or grow box in the bottom right - corner (Mac OS X)} + around the window (Windows, Unix), ability to resize the window (Mac + OS X), or grow box in the bottom right corner (older Mac OS X)} @item{@racket['no-caption] --- omits the title bar for the frame (Windows, Mac OS X, Unix)} diff --git a/pkgs/gui-pkgs/gui-doc/scribblings/gui/grow-box-spacer-pane-class.scrbl b/pkgs/gui-pkgs/gui-doc/scribblings/gui/grow-box-spacer-pane-class.scrbl index 1fd4935086..6410b51566 100644 --- a/pkgs/gui-pkgs/gui-doc/scribblings/gui/grow-box-spacer-pane-class.scrbl +++ b/pkgs/gui-pkgs/gui-doc/scribblings/gui/grow-box-spacer-pane-class.scrbl @@ -5,10 +5,10 @@ A @racket[grow-box-spacer-pane%] object is intended for use as a lightweight spacer in the bottom-right corner of a frame, rather than - as a container. On Mac OS X, a + as a container. On older version of Mac OS X, a @racket[grow-box-spacer-pane%] has the same width and height as the grow box that is inset into the bottom-right corner of a frame. On - Windows and Unix, a @racket[grow-box-spacer-pane%] has zero width and + Windows, Unix, and recent Mac OS X, a @racket[grow-box-spacer-pane%] has zero width and height. Unlike all other container types, a @racket[grow-box-spacer-pane%] is unstretchable by default. diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt index 1c04a237b7..d2afb481bb 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt @@ -236,9 +236,13 @@ NSTitledWindowMask (if is-sheet? NSUtilityWindowMask 0) (if is-dialog? - (if (memq 'close-button style) - NSClosableWindowMask - 0) + (bitwise-ior + (if (memq 'close-button style) + NSClosableWindowMask + 0) + (if (memq 'resize-border style) + NSResizableWindowMask + 0)) (bitwise-ior NSClosableWindowMask NSMiniaturizableWindowMask