From c2f2884f651734e8d09b93dab9c6e1b231b447cf Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Sun, 26 Aug 2012 20:36:12 +0200 Subject: Only redraw caret for top windows. Because we do not all clipping cases... --- atari/browser.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/atari/browser.c b/atari/browser.c index f88610ad3..86401b6d1 100755 --- a/atari/browser.c +++ b/atari/browser.c @@ -669,9 +669,19 @@ void browser_restore_caret_background( struct gui_window * gw, LGRECT * area) area: the browser canvas */ void browser_redraw_caret( struct gui_window * gw, LGRECT * area ) -{ - // TODO: only redraw caret when window is topped. - if( gw->browser->caret.redraw && gw->browser->caret.requested.g_w > 0 ){ +{ + + if( gw->browser->caret.redraw && gw->browser->caret.requested.g_w > 0 ){ + + short wind_info[4]; + + /* Only redraw caret when window is topped. */ + wind_get( 0, WF_TOP, &wind_info[0], &wind_info[1], &wind_info[2], &wind_info[3]); + if (gw->root->handle->handle != wind_info[0]) { + return; + } + + LGRECT caret; struct s_browser * b = gw->browser; struct rect old_clip; -- cgit v1.2.3