From aee9f41d531b253fbfb832fb48269e29e5462f95 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 8 Dec 2010 18:39:31 -0700 Subject: [PATCH] slideshow: tame use of fullscreen mode Closes PR 11490, hopefully --- collects/slideshow/viewer.rkt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/collects/slideshow/viewer.rkt b/collects/slideshow/viewer.rkt index 30c5256276..59f833da21 100644 --- a/collects/slideshow/viewer.rkt +++ b/collects/slideshow/viewer.rkt @@ -414,6 +414,12 @@ (values 0 0) (get-display-left-top-inset))) + (define fullscreen? + (and (not config:keep-titlebar?) + (let-values ([(w h) (get-display-size #t)]) + (and (= config:actual-screen-w w) + (= config:actual-screen-h h))))) + (define background-f (make-object (class frame% (inherit is-shown?) @@ -425,7 +431,9 @@ [x (- screen-left-inset)] [y (- screen-top-inset)] [width (inexact->exact (floor config:actual-screen-w))] [height (inexact->exact (floor config:actual-screen-h))] - [style '(no-caption no-resize-border hide-menu-bar)])))) + [style (append + (if fullscreen? '(hide-menu-bar) null) + '(no-caption no-resize-border))])))) (send background-f enable #f) @@ -440,7 +448,9 @@ [height (inexact->exact (floor config:actual-screen-h))] [style (if config:keep-titlebar? null - '(no-caption no-resize-border hide-menu-bar))])) + (append + (if fullscreen? '(hide-menu-bar) null) + '(no-caption no-resize-border)))])) (define f-both (new talk-frame% [closeable? #t]