Only schedule on-screen redraw areas, and do not substract

scrolling positions from scheduled area.
This commit is contained in:
Ole Loots 2012-12-06 01:07:11 +01:00
parent 395f161eb5
commit 5d2ac2ecac
2 changed files with 5 additions and 4 deletions

View File

@ -375,9 +375,8 @@ void gui_window_update_box(struct gui_window *gw, const struct rect *rect)
slid = guiwin_get_scroll_info(gw->root->win);
guiwin_get_grect(gw->root->win, GUIWIN_AREA_CONTENT, &area);
area.g_x += rect->x0 - slid->x_pos * slid->x_unit_px;
area.g_y += rect->y0 - slid->y_pos * slid->y_unit_px;
area.g_x += rect->x0;
area.g_y += rect->y0;
area.g_w = rect->x1 - rect->x0;
area.g_h = rect->y1 - rect->y0;
window_schedule_redraw_grect(gw->root, &area);
@ -444,6 +443,7 @@ void gui_window_update_extent(struct gui_window *gw)
);
window_update_back_forward(gw->root);
GRECT area;
printf("update extent\n");
guiwin_get_grect(gw->root->win, GUIWIN_AREA_CONTENT, &area);
window_schedule_redraw_grect(gw->root, &area);
}

View File

@ -596,7 +596,8 @@ void window_schedule_redraw_grect(ROOTWIN *rootwin, GRECT *area)
//dbg_grect("window_schedule_redraw_grect input ", area);
guiwin_get_grect(rootwin->win, GUIWIN_AREA_WORK, &work);
rc_intersect(area, &work);
if(!rc_intersect(area, &work))
return;
//dbg_grect("window_schedule_redraw_grect intersection ", &work);