From 7e4deac7073420c65ff31b38d2332a05bb96c9d2 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 2 Oct 2014 16:51:15 -0500 Subject: [PATCH] fix a bug that disabled check syntax's tooltips bug was introduced in august 2013 --- .../drracket/drracket/private/syncheck/gui.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/drracket-pkgs/drracket/drracket/private/syncheck/gui.rkt b/pkgs/drracket-pkgs/drracket/drracket/private/syncheck/gui.rkt index 8ae86fba5e..2db917e7af 100644 --- a/pkgs/drracket-pkgs/drracket/drracket/private/syncheck/gui.rkt +++ b/pkgs/drracket-pkgs/drracket/drracket/private/syncheck/gui.rkt @@ -1464,6 +1464,9 @@ If the namespace does not, they are colored the unbound color. (send text position-location eol-pos xlb ylb #t #t) (define-values (x-off y-off) (send text editor-location-to-dc-location (+ (unbox xlb) 4) (unbox ylb))) + (define (c n) (inexact->exact (round n))) + (define x-off-round (c x-off)) + (define y-off-round (c y-off)) (define window (let loop ([ed text]) (cond @@ -1474,9 +1477,8 @@ If the namespace does not, they are colored the unbound color. (loop (send (send admin get-snip) get-editor)) #f)]))) (cond - [(and window (position-integer? x-off) (position-integer? y-off)) - (define (c n) (inexact->exact (round n))) - (define-values (gx gy) (send window client->screen (c x-off) (c y-off))) + [(and window (position-integer? x-off-round) (position-integer? y-off-round)) + (define-values (gx gy) (send window client->screen x-off-round y-off-round)) (values gx gy gx gy)] [else (values #f #f #f #f)]))