summaryrefslogtreecommitdiff
path: root/frontends/framebuffer
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-08-04 11:23:35 +0100
committerVincent Sanders <vince@kyllikki.org>2019-08-04 11:25:35 +0100
commitf21c41a2e549e22e523118e8d8f2c881c0f088a7 (patch)
tree06c382262a3dca39bb545ab94660ca91c3660c9c /frontends/framebuffer
parentb2f5c80ef82c2e76bd33f58b6454031500c98504 (diff)
downloadnetsurf-f21c41a2e549e22e523118e8d8f2c881c0f088a7.tar.gz
netsurf-f21c41a2e549e22e523118e8d8f2c881c0f088a7.tar.bz2
change browser_window_redraw to use unscaled coordinates
Diffstat (limited to 'frontends/framebuffer')
-rw-r--r--frontends/framebuffer/gui.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 7413739e2..914187ba6 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -357,7 +357,6 @@ fb_redraw(fbtk_widget_t *widget,
.plot = &fb_plotters
};
nsfb_t *nsfb = fbtk_get_nsfb(widget);
- float scale = browser_window_get_scale(bw);
x = fbtk_get_absx(widget);
y = fbtk_get_absy(widget);
@@ -377,8 +376,8 @@ fb_redraw(fbtk_widget_t *widget,
clip.y1 = bwidget->redraw_box.y1;
browser_window_redraw(bw,
- (x - bwidget->scrollx) / scale,
- (y - bwidget->scrolly) / scale,
+ x - bwidget->scrollx,
+ y - bwidget->scrolly,
&clip, &ctx);
if (fbtk_get_caret(widget, &caret_x, &caret_y, &caret_h)) {
@@ -1861,10 +1860,9 @@ static bool
gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
struct browser_widget_s *bwidget = fbtk_get_userpw(g->browser);
- float scale = browser_window_get_scale(g->bw);
- *sx = bwidget->scrollx / scale;
- *sy = bwidget->scrolly / scale;
+ *sx = bwidget->scrollx;
+ *sy = bwidget->scrolly;
return true;
}
@@ -1884,12 +1882,11 @@ static nserror
gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
{
struct browser_widget_s *bwidget = fbtk_get_userpw(gw->browser);
- float scale = browser_window_get_scale(gw->bw);
assert(bwidget);
- widget_scroll_x(gw, rect->x0 * scale, true);
- widget_scroll_y(gw, rect->y0 * scale, true);
+ widget_scroll_x(gw, rect->x0, true);
+ widget_scroll_y(gw, rect->y0, true);
return NSERROR_OK;
}