mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-13 14:29:20 +03:00
Only redraw caret for top windows.
Because we do not all clipping cases...
This commit is contained in:
parent
c941cee104
commit
c2f2884f65
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user