From d34656a4085c83952ad3ff353c011e94a8ecdd02 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 12 May 2008 15:47:12 +0000 Subject: [PATCH] floating windows should not become targets for Quit menu, etc. svn: r9814 --- collects/mred/private/wxtop.ss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/mred/private/wxtop.ss b/collects/mred/private/wxtop.ss index 050218c3a4..ada1f634e9 100644 --- a/collects/mred/private/wxtop.ss +++ b/collects/mred/private/wxtop.ss @@ -580,12 +580,14 @@ (sequence (apply super-init parent args)))) - (define (make-top-level-window-glue% %) ; implies make-window-glue% + (define (make-top-level-window-glue% style-pos %) ; implies make-window-glue% (class100 (make-window-glue% %) (mred proxy . args) (inherit is-shown? get-mred queue-visible get-eventspace) (private-field [act-date/seconds 0] [act-date/milliseconds 0] [act-on? #f] - [activate-refresh-wins null]) + [activate-refresh-wins null] + [floating-window? (and ((length args) . >= . style-pos) + (memq 'float (list-ref args style-pos)))]) (public [on-exit (entry-point (lambda () @@ -612,7 +614,8 @@ (set! act-date/seconds (current-seconds)) (set! act-date/milliseconds (current-milliseconds)) (when (and (wx:main-eventspace? (get-eventspace)) - (not (eq? this root-menu-wx-frame))) + (not (eq? this root-menu-wx-frame)) + (not floating-window?)) (set! active-main-frame (make-weak-box this)))) ;; Send refresh to subwindows that need it (set! activate-refresh-wins (filter weak-box-value activate-refresh-wins)) @@ -664,6 +667,7 @@ (define wx-frame% (make-top-level-window-glue% + 6 (class100 (make-top-container% wx:frame% #f) args (private-field [menu-bar #f] @@ -724,6 +728,7 @@ (define wx-dialog% (make-top-level-window-glue% + 7 (class100 (make-top-container% wx:dialog% #t) args (sequence (apply super-init args))))))