From 0c96d2ca9559e77c694670dff84ff7e235346a58 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 8 May 2013 08:52:37 -0500 Subject: [PATCH] tighten up the contract for get-display-size and get-display-left-top-inset --- collects/scribblings/gui/global-draw-funcs.scrbl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/gui/global-draw-funcs.scrbl b/collects/scribblings/gui/global-draw-funcs.scrbl index e957061498..78b894fe5c 100644 --- a/collects/scribblings/gui/global-draw-funcs.scrbl +++ b/collects/scribblings/gui/global-draw-funcs.scrbl @@ -32,8 +32,12 @@ Returns the depth of the main display (a value of 1 denotes a monochrome display @defproc[(get-display-left-top-inset [avoid-bars? any/c #f] [#:monitor monitor exact-nonnegative-integer? 0]) - (values (or/c exact-nonnegative-integer? #f) - (or/c exact-nonnegative-integer? #f))]{ + (values (if (= monitor 0) + exact-nonnegative-integer? + (or/c exact-nonnegative-integer? #f)) + (if (= monitor 0) + exact-nonnegative-integer? + (or/c exact-nonnegative-integer? #f)))]{ When the optional argument is @racket[#f] (the default), this function returns the offset of @racket[monitor]'s origin from the @@ -58,8 +62,12 @@ If @racket[monitor] is not less than the current number of available @defproc[(get-display-size [full-screen? any/c #f] [#:monitor monitor exact-nonnegative-integer? 0]) - (values (or/c exact-nonnegative-integer? #f) - (or/c exact-nonnegative-integer? #f))]{ + (values (if (= monitor 0) + exact-nonnegative-integer? + (or/c exact-nonnegative-integer? #f)) + (if (= monitor 0) + exact-nonnegative-integer? + (or/c exact-nonnegative-integer? #f)))]{ @index["screen resolution"]{Gets} the physical size of the specified @racket[monitor] in pixels. On Windows, this size does not include the task bar by