Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/552aab42e16689c24ac566913b02c7613bfc090b
...commit
http://git.netsurf-browser.org/netsurf.git/commit/552aab42e16689c24ac566913b02c7613bfc090b
...tree
http://git.netsurf-browser.org/netsurf.git/tree/552aab42e16689c24ac566913b02c7613bfc090b
The branch, master has been updated
via 552aab42e16689c24ac566913b02c7613bfc090b (commit)
via 4ae27a65929a5fe333dc9f9f0d43ac91a72a0116 (commit)
from 5c9d54d05b35f3f06261f8bf9c3a48d2293df767 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=552aab42e16689c24ac566913b02c7613bfc090b
commit 552aab42e16689c24ac566913b02c7613bfc090b
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
remove scaled parameter from get_dimensions
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 547c799..ccab57f 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1168,7 +1168,7 @@ static void scheduled_reformat(void *vbw)
int height;
nserror res;
- res = guit->window->get_dimensions(bw->window, &width, &height, false);
+ res = guit->window->get_dimensions(bw->window, &width, &height);
if (res == NSERROR_OK) {
browser_window_reformat(bw, false, width, height);
}
@@ -2652,7 +2652,7 @@ browser_window_get_dimensions(struct browser_window *bw,
res = NSERROR_OK;
} else {
/* Front end window */
- res = guit->window->get_dimensions(bw->window, width, height,
false);
+ res = guit->window->get_dimensions(bw->window, width, height);
}
return res;
}
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index f5a7cad..0b4ae7a 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -2076,14 +2076,17 @@ static void ami_gui_menu_update_all(void)
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
-static nserror gui_window_get_dimensions(struct gui_window *gw,
- int *restrict width, int *restrict height, bool scaled)
+static nserror
+gui_window_get_dimensions(struct gui_window *gw,
+ int *restrict width,
+ int *restrict height)
{
struct IBox *bbox;
nserror res;
- res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
&bbox);
- if(res != NSERROR_OK) {
+ res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
+ &bbox);
+ if (res != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return res;
}
@@ -2093,11 +2096,6 @@ static nserror gui_window_get_dimensions(struct
gui_window *gw,
ami_gui_free_space_box(bbox);
- if(scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index 374220b..5e2fd61 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -299,15 +299,11 @@ void gui_window_destroy(struct gui_window *gw)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GRECT rect;
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index 49d049c..6c12e4e 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -1341,24 +1341,17 @@ struct gui_clipboard_table *beos_clipboard_table =
&clipboard_table;
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
if (g->view &&
g->view->LockLooper()) {
*width = g->view->Bounds().Width() + 1;
*height = g->view->Bounds().Height() + 1;
g->view->UnlockLooper();
-
- if (scaled) {
- *width /= g->scale;
- *height /= g->scale;
- }
}
return NSERROR_OK;
}
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 95e35fb..74f6100 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -1881,23 +1881,14 @@ gui_window_set_scroll(struct gui_window *gw, const
struct rect *rect)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = fbtk_get_width(gw->browser);
*height = fbtk_get_height(gw->browser);
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index 0a2dac1..aab4597 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -1213,14 +1213,11 @@ static void gui_window_place_caret(struct gui_window
*g, int x, int y, int heigh
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GtkAllocation alloc;
@@ -1230,12 +1227,6 @@ gui_window_get_dimensions(struct gui_window *gw,
*width = alloc.width;
*height = alloc.height;
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index a00dcb4..d6dd951 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -119,18 +119,18 @@ gui_window_set_title(struct gui_window *g, const char
*title)
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
- moutf(MOUT_WINDOW, "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
- g->win_num, g->width, g->height);
*width = g->width;
*height = g->height;
+ moutf(MOUT_WINDOW,
+ "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
+ g->win_num, *width, *height);
+
return NSERROR_OK;
}
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 53a7b58..b949c02 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -3679,21 +3679,15 @@ gui_window_set_scroll(struct gui_window *g, const
struct rect *rect)
* \param gw gui window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
/* use the cached window sizes */
*width = gw->old_width / 2;
*height = gw->old_height / 2;
- if (scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 689e78d..06e7346 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1522,12 +1522,10 @@ static void win32_window_destroy(struct gui_window *w)
* \param gw gui_window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-win32_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+win32_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = gw->width;
*height = gw->height;
diff --git a/include/netsurf/window.h b/include/netsurf/window.h
index 8fc7c7b..9f5371e 100644
--- a/include/netsurf/window.h
+++ b/include/netsurf/window.h
@@ -175,11 +175,10 @@ struct gui_window_table {
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on success and width and height updated
* else error code.
*/
- nserror (*get_dimensions)(struct gui_window *gw, int *width, int
*height, bool scaled);
+ nserror (*get_dimensions)(struct gui_window *gw, int *width, int
*height);
/**
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=4ae27a65929a5fe333dc9f9f0d43ac91a72a0116
commit 4ae27a65929a5fe333dc9f9f0d43ac91a72a0116
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
remove scaling from internal browser get_dimensions calls
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index a5a6dcc..68487ea 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -254,10 +254,10 @@ nserror browser_window_initialise_common(enum
browser_window_create_flags flags,
* \param bw The browser window to get dimensions of
* \param width Updated to the browser window viewport width
* \param height Updated to the browser window viewport height
- * \param scaled Whether we want the height with scale applied
+ * \return NSERROR_OK and width and height updated otherwise error code
*/
-void browser_window_get_dimensions(struct browser_window *bw,
- int *width, int *height, bool scaled);
+nserror browser_window_get_dimensions(struct browser_window *bw,
+ int *width, int *height);
/**
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 397c6f1..547c799 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -674,7 +674,9 @@ static nserror browser_window_content_ready(struct
browser_window *bw)
bw->loading_content = NULL;
/* Format the new content to the correct dimensions */
- browser_window_get_dimensions(bw, &width, &height, true);
+ browser_window_get_dimensions(bw, &width, &height);
+ width /= bw->scale;
+ height /= bw->scale;
content_reformat(bw->current_content, false, width, height);
/* history */
@@ -974,10 +976,10 @@ browser_window_callback(hlcache_handle *c, const
hlcache_event *event, void *pw)
int width;
int height;
- browser_window_get_dimensions(bw, &width, &height, true);
+ browser_window_get_dimensions(bw, &width, &height);
- *(event->data.getdims.viewport_width) = width;
- *(event->data.getdims.viewport_height) = height;
+ *(event->data.getdims.viewport_width) = width / bw->scale;
+ *(event->data.getdims.viewport_height) = height / bw->scale;
break;
}
@@ -2635,22 +2637,24 @@ nserror browser_window_get_extents(struct
browser_window *bw, bool scaled,
/* exported internal interface, documented in desktop/browser_private.h */
-void
+nserror
browser_window_get_dimensions(struct browser_window *bw,
int *width,
- int *height,
- bool scaled)
+ int *height)
{
+ nserror res;
assert(bw);
if (bw->window == NULL) {
/* Core managed browser window */
*width = bw->width;
*height = bw->height;
+ res = NSERROR_OK;
} else {
/* Front end window */
- guit->window->get_dimensions(bw->window, width, height, scaled);
+ res = guit->window->get_dimensions(bw->window, width, height,
false);
}
+ return res;
}
diff --git a/desktop/frames.c b/desktop/frames.c
index ebc54c6..1ed1145 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -436,7 +436,9 @@ void browser_window_recalculate_frameset(struct
browser_window *bw)
/* window dimensions */
if (!bw->parent) {
- browser_window_get_dimensions(bw, &bw_width, &bw_height, true);
+ browser_window_get_dimensions(bw, &bw_width, &bw_height);
+ bw_width /= bw->scale;
+ bw_height /= bw->scale;
bw->x = 0;
bw->y = 0;
bw->width = bw_width;
-----------------------------------------------------------------------
Summary of changes:
desktop/browser_private.h | 6 +++---
desktop/browser_window.c | 22 +++++++++++++---------
desktop/frames.c | 4 +++-
frontends/amiga/gui.c | 16 +++++++---------
frontends/atari/gui.c | 6 +-----
frontends/beos/window.cpp | 9 +--------
frontends/framebuffer/gui.c | 11 +----------
frontends/gtk/window.c | 11 +----------
frontends/monkey/browser.c | 10 +++++-----
frontends/riscos/window.c | 10 ++--------
frontends/windows/window.c | 6 ++----
include/netsurf/window.h | 3 +--
12 files changed, 40 insertions(+), 74 deletions(-)
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index a5a6dcc..68487ea 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -254,10 +254,10 @@ nserror browser_window_initialise_common(enum
browser_window_create_flags flags,
* \param bw The browser window to get dimensions of
* \param width Updated to the browser window viewport width
* \param height Updated to the browser window viewport height
- * \param scaled Whether we want the height with scale applied
+ * \return NSERROR_OK and width and height updated otherwise error code
*/
-void browser_window_get_dimensions(struct browser_window *bw,
- int *width, int *height, bool scaled);
+nserror browser_window_get_dimensions(struct browser_window *bw,
+ int *width, int *height);
/**
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 397c6f1..ccab57f 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -674,7 +674,9 @@ static nserror browser_window_content_ready(struct
browser_window *bw)
bw->loading_content = NULL;
/* Format the new content to the correct dimensions */
- browser_window_get_dimensions(bw, &width, &height, true);
+ browser_window_get_dimensions(bw, &width, &height);
+ width /= bw->scale;
+ height /= bw->scale;
content_reformat(bw->current_content, false, width, height);
/* history */
@@ -974,10 +976,10 @@ browser_window_callback(hlcache_handle *c, const
hlcache_event *event, void *pw)
int width;
int height;
- browser_window_get_dimensions(bw, &width, &height, true);
+ browser_window_get_dimensions(bw, &width, &height);
- *(event->data.getdims.viewport_width) = width;
- *(event->data.getdims.viewport_height) = height;
+ *(event->data.getdims.viewport_width) = width / bw->scale;
+ *(event->data.getdims.viewport_height) = height / bw->scale;
break;
}
@@ -1166,7 +1168,7 @@ static void scheduled_reformat(void *vbw)
int height;
nserror res;
- res = guit->window->get_dimensions(bw->window, &width, &height, false);
+ res = guit->window->get_dimensions(bw->window, &width, &height);
if (res == NSERROR_OK) {
browser_window_reformat(bw, false, width, height);
}
@@ -2635,22 +2637,24 @@ nserror browser_window_get_extents(struct
browser_window *bw, bool scaled,
/* exported internal interface, documented in desktop/browser_private.h */
-void
+nserror
browser_window_get_dimensions(struct browser_window *bw,
int *width,
- int *height,
- bool scaled)
+ int *height)
{
+ nserror res;
assert(bw);
if (bw->window == NULL) {
/* Core managed browser window */
*width = bw->width;
*height = bw->height;
+ res = NSERROR_OK;
} else {
/* Front end window */
- guit->window->get_dimensions(bw->window, width, height, scaled);
+ res = guit->window->get_dimensions(bw->window, width, height);
}
+ return res;
}
diff --git a/desktop/frames.c b/desktop/frames.c
index ebc54c6..1ed1145 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -436,7 +436,9 @@ void browser_window_recalculate_frameset(struct
browser_window *bw)
/* window dimensions */
if (!bw->parent) {
- browser_window_get_dimensions(bw, &bw_width, &bw_height, true);
+ browser_window_get_dimensions(bw, &bw_width, &bw_height);
+ bw_width /= bw->scale;
+ bw_height /= bw->scale;
bw->x = 0;
bw->y = 0;
bw->width = bw_width;
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index f5a7cad..0b4ae7a 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -2076,14 +2076,17 @@ static void ami_gui_menu_update_all(void)
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
-static nserror gui_window_get_dimensions(struct gui_window *gw,
- int *restrict width, int *restrict height, bool scaled)
+static nserror
+gui_window_get_dimensions(struct gui_window *gw,
+ int *restrict width,
+ int *restrict height)
{
struct IBox *bbox;
nserror res;
- res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
&bbox);
- if(res != NSERROR_OK) {
+ res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
+ &bbox);
+ if (res != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return res;
}
@@ -2093,11 +2096,6 @@ static nserror gui_window_get_dimensions(struct
gui_window *gw,
ami_gui_free_space_box(bbox);
- if(scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index 374220b..5e2fd61 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -299,15 +299,11 @@ void gui_window_destroy(struct gui_window *gw)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GRECT rect;
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index 49d049c..6c12e4e 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -1341,24 +1341,17 @@ struct gui_clipboard_table *beos_clipboard_table =
&clipboard_table;
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
if (g->view &&
g->view->LockLooper()) {
*width = g->view->Bounds().Width() + 1;
*height = g->view->Bounds().Height() + 1;
g->view->UnlockLooper();
-
- if (scaled) {
- *width /= g->scale;
- *height /= g->scale;
- }
}
return NSERROR_OK;
}
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 95e35fb..74f6100 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -1881,23 +1881,14 @@ gui_window_set_scroll(struct gui_window *gw, const
struct rect *rect)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = fbtk_get_width(gw->browser);
*height = fbtk_get_height(gw->browser);
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index 0a2dac1..aab4597 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -1213,14 +1213,11 @@ static void gui_window_place_caret(struct gui_window
*g, int x, int y, int heigh
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GtkAllocation alloc;
@@ -1230,12 +1227,6 @@ gui_window_get_dimensions(struct gui_window *gw,
*width = alloc.width;
*height = alloc.height;
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index a00dcb4..d6dd951 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -119,18 +119,18 @@ gui_window_set_title(struct gui_window *g, const char
*title)
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
- moutf(MOUT_WINDOW, "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
- g->win_num, g->width, g->height);
*width = g->width;
*height = g->height;
+ moutf(MOUT_WINDOW,
+ "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
+ g->win_num, *width, *height);
+
return NSERROR_OK;
}
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 53a7b58..b949c02 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -3679,21 +3679,15 @@ gui_window_set_scroll(struct gui_window *g, const
struct rect *rect)
* \param gw gui window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
/* use the cached window sizes */
*width = gw->old_width / 2;
*height = gw->old_height / 2;
- if (scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 689e78d..06e7346 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1522,12 +1522,10 @@ static void win32_window_destroy(struct gui_window *w)
* \param gw gui_window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-win32_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+win32_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = gw->width;
*height = gw->height;
diff --git a/include/netsurf/window.h b/include/netsurf/window.h
index 8fc7c7b..9f5371e 100644
--- a/include/netsurf/window.h
+++ b/include/netsurf/window.h
@@ -175,11 +175,10 @@ struct gui_window_table {
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on success and width and height updated
* else error code.
*/
- nserror (*get_dimensions)(struct gui_window *gw, int *width, int
*height, bool scaled);
+ nserror (*get_dimensions)(struct gui_window *gw, int *width, int
*height);
/**
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org