Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/a1951f4c49a44783478c7000bd5ac5d349375488
...commit
http://git.netsurf-browser.org/netsurf.git/commit/a1951f4c49a44783478c7000bd5ac5d349375488
...tree
http://git.netsurf-browser.org/netsurf.git/tree/a1951f4c49a44783478c7000bd5ac5d349375488
The branch, master has been updated
via a1951f4c49a44783478c7000bd5ac5d349375488 (commit)
from 01485d06baf0098c2f0ec3ac48ea49150e550de9 (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=a1951f4c49a44783478c7000bd5ac5d349375488
commit a1951f4c49a44783478c7000bd5ac5d349375488
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
RISC OS: Fix ro_cw_get_window_dimensions to account for toolbar height.
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index a544352..8004dcc 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -904,6 +904,15 @@ ro_cw_get_window_dimensions(struct core_window *cw, int
*width, int *height)
*width = (state.visible.x1 - state.visible.x0) / 2;
*height = (state.visible.y1 - state.visible.y0) / 2;
+
+ /* Account for toolbar height, if present */
+ if (ro_cw->toolbar != NULL) {
+ *height -= ro_toolbar_full_height(ro_cw->toolbar) / 2;
+ }
+ if (*height < 0) {
+ *height = 0;
+ }
+
return NSERROR_OK;
}
-----------------------------------------------------------------------
Summary of changes:
frontends/riscos/corewindow.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index a544352..8004dcc 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -904,6 +904,15 @@ ro_cw_get_window_dimensions(struct core_window *cw, int
*width, int *height)
*width = (state.visible.x1 - state.visible.x0) / 2;
*height = (state.visible.y1 - state.visible.y0) / 2;
+
+ /* Account for toolbar height, if present */
+ if (ro_cw->toolbar != NULL) {
+ *height -= ro_toolbar_full_height(ro_cw->toolbar) / 2;
+ }
+ if (*height < 0) {
+ *height = 0;
+ }
+
return NSERROR_OK;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org