Browser window: Make invalidate gui callback use unsacled coordinates.

This commit is contained in:
Michael Drake 2019-08-01 20:30:55 +01:00 committed by Vincent Sanders
parent e85e2f7cdf
commit de12be4e9c
1 changed files with 9 additions and 7 deletions

View File

@ -2760,14 +2760,11 @@ void browser_window_update_box(struct browser_window *bw, struct rect *rect)
{
int pos_x;
int pos_y;
struct browser_window *top;
struct browser_window *top = bw;
assert(bw);
if (bw->window != NULL) {
/* Front end window */
guit->window->invalidate(bw->window, rect);
} else {
if (bw->window == NULL) {
/* Core managed browser window */
browser_window_get_position(bw, true, &pos_x, &pos_y);
@ -2777,9 +2774,14 @@ void browser_window_update_box(struct browser_window *bw, struct rect *rect)
rect->y0 += pos_y / bw->scale;
rect->x1 += pos_x / bw->scale;
rect->y1 += pos_y / bw->scale;
guit->window->invalidate(top->window, rect);
}
rect->x0 *= top->scale;
rect->y0 *= top->scale;
rect->x1 *= top->scale;
rect->y1 *= top->scale;
guit->window->invalidate(top->window, rect);
}