[softwarelist] Re: Thesaurus disables Mouse wheel Scrolling

  • From: David Pilling <flist@xxxxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Wed, 18 Feb 2009 17:47:06 +0000

** Reposted **

From  Paul Reuvers <info@xxxxxx>


Hi David (and others),

I never thought that HID would generate such a long off-topic conversation. However, as it adds to the overall usability of an application, I'll try to explain it a bit further.

HID has a range of options for scrolling a window. It can send key-presses to the application, send a scroll-request (if the application supports that), etc. The best results, however, are obtained with the default method that does a Wimp_ReopenWindow request with modified positions of the vertical and/or horizontal scroll bars. HID tries to work out the total height and the height of the scroll bar to obtain the best smooth scrolling results. I also tried to simulate mouse clicks over the up/down arrow icons (above and below the scroll bar) but somehow I never got it to work. The 'Eureka mode' does something similar, which was necessary, as Eureka doesn't rely on the WIMP to draw the gadgets.

All of the above are legal methods. The best method would be by sending a scroll request to the application (as per PRM) but unfortunately, hardly any program will respond to that (with the exception of !Edit). Besides, the results of a scroll-request will vary between programs.

Sending requests from another application is perfectly legal, except for the fact that in one particular situation, the WIMP itself will try to access out-of-context memory.

Over time, Acorn software engineers have been trying to squeeze additional features into the WIMP without adding new flags or calls (and hence lose compatibility). They often used special conditions (such as both MinX and MinY set to 0) to add additional functionality. Under normal circumstances, the template editor would be used to design windows. When creating a window, the standard Acorn Template Editor defaults to 1 (rather than 0), so that standard functionality is retained.

I discussed this issue a long time ago with John Ballance and we both agreed that it could be considered a bug. Under the given circumstances there was no need for the WIMP to access the indirected memory when one was just altering the window flags (and hence cause a window redraw). Somehow they never got around fixing it, however.

I've only seen the described problem with two applications myself, and in both cases it could be fixed by altering the Template file, as there was no need to have both MinX and MinY set to zero. One of these was my own software and the other one was a particular !Paint window, if I recall correctly. I think most programmers are not aware of the special condition that is raised when MinX=MinY=0. It is well hidden in the PRM.

Fixing the problem on the HID-side appeared to be impossible, as HID could not avoid the WIMP accessing illegal memory. The only option was to give up the smooth scrolling method of HID altogether, but since only a handful of applications was failing, I felt it was better to keep that method and allow users to select an alternative method in such circumstances. I can't guarantee that HID works with every single program, as, over time, programmers have used a wide variety of methods for creating windows with tools, scrollbars and gatgets that were not normally possible on RISC OS.

E.g., some programs show a pane with some contents, but use the scrollbar of the window behind it to scroll the contents. Some programs use a separate window, with only a scrollbar in it, attached to the side of the window that they want to be scrolled. Sometimes programmers have forgotten to set the 'window-is-a-pane' flag of a pane window. Computer Concepts software uses even more bizarre window designs. In later years, Acorn developed the Nested-WIMP, making things even more complicated. When such windows are encountered, HID does its best to 'guess' what to do to scroll the window under the mouse pointer. In most cases it succeeds, but it might fail. If all methods fail, the application can be excluded from the scroll function altogether.

David,
If Thesaurus is one of your applications, I think it would be rather straightforward to fix it. It you want to fix someone else's program, it would be sufficient to alter the Template file, but you have to keep in mind that you might need to alter it again when a new version of the software is released. Whenever possible, it would be better to report the problem back to the programmer and hope for a fix.

Best regards,


--

Paul Reuvers
To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: