DisplayManager boo boo
nemo (145) 2554 posts |
Can anyone explain what DisplayManager thinks it is doing here? Yup. Wonky (and always has been). But the deeper question is this: It is trying to redraw the screen and send a Wimp message in response to a couple of service calls, either of which could have been legitimately issued when DisplayManager has no business trying to do Wimp calls. The fact that they’re X calls is irrelevant: the message will not get sent. It ought to be setting a poll word and doing this when polled. Otherwise it imposes the consequences of ForceRedraw on the callers of Wimp_SetPalette and, significantly, ColourTrans_SetCalibration – and I don’t think they’ve ever been documented as illegal inside a wimp redraw loop, for example. |
Jeffrey Lee (213) 6048 posts |
The source for that is here: https://gitlab.riscosopen.org/RiscOS/Sources/Video/UserI/Display/blob/master/s/Module#L305 |
Jon Abbott (1421) 2651 posts |
Calls to Wimp SWI’s out of context have all kinds of knock on undesirable effects. Whilst coding the Wimp support in ADFFS, I noticed all kinds of Wimp calls occurring at inappropriate times, usually resulting in a locked machine because the Wimp calls were triggering task switching without notifying the filter. With this service call, should the actions not be scheduled to occur in a foreground Wimp context? |
Rick Murray (539) 13850 posts |
. Well, that was eye opening.
And, of course, the link above won’t show anything useful on NetSurf either… <shrug> |
nemo (145) 2554 posts |
Jon asked
Yes. Which is why I wrote It ought to be setting a poll word and doing this when polled Rick found
Neither SendMessage nor ForceRedraw can be used from the background. The former requires a currently initialised task (and the resulting message will appear to come from that task), and the latter has many side-effects such as cancelling any ongoing redraw even if the task is paged in and currently drawing! And also WTF of course. The hilarious bit is that someone decided to call that function from a callback – you know, cos you can’t do that kind of thing whenever. <facepalm> Copyright 2003 indeed. And still there. |
Rick Murray (539) 13850 posts |
You do understand, I hope, that around here, that’s known as yesterday. |
Clive Semmens (2335) 3276 posts |
If not tomorrow. |