mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-20 11:12:46 +03:00
RISC OS: Fix ro_cw_get_window_dimensions to account for toolbar height.
This commit is contained in:
parent
01485d06ba
commit
a1951f4c49
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user