From 8264e7758539bc2e27385e77839dcfce2ef38948 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 16 Aug 2011 08:12:31 -0600 Subject: [PATCH] gtk: fix frame for `text-field%' and other `canvas%'es --- collects/mred/private/wx/gtk/panel.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/mred/private/wx/gtk/panel.rkt b/collects/mred/private/wx/gtk/panel.rkt index f1aa712812..566d601b8a 100644 --- a/collects/mred/private/wx/gtk/panel.rkt +++ b/collects/mred/private/wx/gtk/panel.rkt @@ -35,10 +35,12 @@ [gray #x8000]) (when gc (gdk_gc_set_rgb_fg_color gc (make-GdkColor 0 gray gray gray)) - (let ([a (widget-allocation gtk)]) + (let ([a (widget-allocation gtk)] + [no-window? (not (zero? (bitwise-and (get-gtk-object-flags gtk) + GTK_NO_WINDOW)))]) (gdk_draw_rectangle win gc #f - 0 - 0 + (if no-window? (GtkAllocation-x a) 0) + (if no-window? (GtkAllocation-y a) 0) (sub1 (GtkAllocation-width a)) (sub1 (GtkAllocation-height a)))) (gdk_gc_unref gc)))