diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-05-19 17:31:34 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-05-19 17:31:34 +0000 |
commit | a2e2222ac8ed73437e5a2914e4a29cd3635e4cb0 (patch) | |
tree | 811eb89bcbdb3d35d813cbc42a07496daaf621c8 /riscos/wimp.c | |
parent | d4928a03164ac503974af23254d53886b41ea2bf (diff) | |
download | netsurf-a2e2222ac8ed73437e5a2914e4a29cd3635e4cb0.tar.gz netsurf-a2e2222ac8ed73437e5a2914e4a29cd3635e4cb0.tar.bz2 |
[project @ 2004-05-19 17:31:34 by rjw]
Fix for WindowManager 3.98
svn path=/import/netsurf/; revision=868
Diffstat (limited to 'riscos/wimp.c')
-rw-r--r-- | riscos/wimp.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/riscos/wimp.c b/riscos/wimp.c index baa9d1fa0..0c8a3a3f8 100644 --- a/riscos/wimp.c +++ b/riscos/wimp.c @@ -16,8 +16,9 @@ #include "oslib/os.h" #include "oslib/wimp.h" #include "oslib/wimpextend.h" +#include "oslib/wimpreadsysinfo.h" #include "netsurf/riscos/wimp.h" - +#include "netsurf/utils/log.h" /* Wimp_Extend,11 block */ @@ -27,9 +28,27 @@ static wimpextend_furniture_sizes furniture_sizes; * Gets the default horzontal scrollbar height */ int ro_get_hscroll_height(wimp_w w) { + wimp_version_no version; + + + /* Read the hscroll height + */ furniture_sizes.w = w; furniture_sizes.border_widths.y0 = 38; xwimpextend_get_furniture_sizes(&furniture_sizes); + + /* There is a quirk with the returned size as it differs between versions of the + WindowManager module. The incorrect height is returned by the version distributed + with the universal boot sequence (3.98) and presumably any previous version. + */ + if (!xwimpreadsysinfo_version(&version)) { + if ((int)version <= 398) { + return furniture_sizes.border_widths.y0 + 2; + } + } + + /* Return the standard (unhacked) size + */ return furniture_sizes.border_widths.y0; } |