[softwarelist] Re: Thesaurus disables Mouse wheel Scrolling

  • From: Paul Reuvers <paul@xxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Mon, 16 Feb 2009 16:55:32 +0100

Hi Roger (and others),

On 16 Feb 2009, at 15:26, Roger Darlington wrote:

On 16 Feb 2009, David Pilling wrote:
In message <bb4a772e50.rogerarm@xxxxxxxxxxxxxxxxxxx>, Roger Darlington
<rogerarm@xxxxxxxxxx> writes
Thesaurus 1.25, whenever you are tempted to use the mouse scroll wheel
in any of its windows, disables and crashes mouse scrolling on the
Iyonix RO5.13.

That is interesting. I wonder why such a thing could happen. Thesaurus
(bundled with Ovation Pro (both Windows and RISC OS)) is a simple
application.

Does it crash every time or just when the windows are near their limits.


Firstly: [It crashes the scroll wheel if 'HID is set to 'fixed
distance'].


There is a technical reason for why it crashes, which could arguably called a bug or a mis-feature of RISC OS. As far as I know, it only happens in RISC OS 5. Natively, scrolling is not supported by RSIC OS, so HID has to perform a few tricks. When I developed HID, I noticed that it wasn't possible to implement a single scrolling method, as different programs behave differently. So I developed a couple of methods, which enables people to select the method appropriate for each application.

The default method works best for most applications but when embedded windows are used (i.e. a window inside another window), the vertical scrollbar used to scroll the content of your window vertically, may in fact be tied to another window behind it. HID checks the entire window stack for the appropriate flags, in order to make the right decision.

[technical mode on]
If I recall it correctly, the problem occurs when the main window (say: the 'parent' of the window that must be scrolled) has an indirected title AND both MinX and MinY are set to 0 (i.e the minimum widh and hight of the window). If this is the case, the title isn't stored in the window's workspace, but in the application workspace. HID is a background task (i.e. a module) that access the window 'out of context'. At the time HID tries to read the window's flags, the application space may be mapped out (as another application may be active at that moment).

Now, HID doesn't need access to the window title at all, so why does it try to read it? Well, it doesn't. It's done by the window manager when HID tries to read the window flags. When both MinX and MinY are set to 0, a special condition is met. In that case, according to the PRM, the width of the window is set by the window title. Anyway, this is sort of what is happening.

A possible solution (for the programmer) is to set the minimum width of a window to 1 rather than 0.
[technical mode off]

Sorry for this off-topic explanation.


 X-Ample Technology BV
 Paul Reuvers
 info@xxxxxx




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

Other related posts: