NetSurf Illegal Window Handle
Pages: 1 2
David Pitt (3386) 1248 posts |
Yes, it is fixed in #4960, and is most welcome, many thanks. |
Dave Higton (1515) 3534 posts |
My apologies for the double post (now removed). I’ve updated NetSurf Mantis bug 2728 to show that NS has been fixed. Thanks for the reports. |
jan de boer (472) 78 posts |
The recent work on Wimp_SetCaretPosition maybe has made another victim. When you have a window without icons, in where you can drag and click (such as for editors, emulators) but which is not writable, then since the RO5.27 RPI-rom from 19-12-18 it is impossible to gain inputfocus. I used SYS"Wimp_SetCaretPosition", handle,-1,0,-1,-1,-1 to that end since ~25 years. If there is only 1 writable icon in that window, inputfocus is possible again. There are 2 testproggies “InputFocus” at www.tellima.nl/riscos/ to give an idea what’s going on. |
Andy Vawer (5817) 28 posts |
Thanks for the details, Jan. I see what you mean. When the focus is set with that call, the input focus is moved to the desired window but for some reason the focus in event and visible cues are not set. I have submitted a possible fix to ROOL that caters for the R0=window handle, R1<0, R4=-1 (no flags) case and internally changes R4 to 0×02000000 (invisible caret). My version seems to work fine with your test programs now. Note that the PRM says “R4 and R5 can only be set to –1 if the icon handle passed in R1 is non-negative.” but this isn’t mentioned in the online docs which are more vague and just say R4=-1 means no flags. My interpretation of the PRM is that Wimp_SetCaretPosition,window_handle,-1,0,-1,-1,-1 isn’t strictly speaking a valid call as R4 mustn’t be -1 here, but obviously this has worked fine for the past 30 years… There may be other situations where things worked even though they possibly shouldn’t have; we’ll have to see what else crops up and how we resolve them… |
jan de boer (472) 78 posts |
You are right, the way I called WimpSetCaretPos was incorrect. As !Zap has the same sort of mainwindow and does not suffer, I found the solution there already: call with handle,-1,0,0 1<<25,-1. I will change my software and scribble it in my PRM books. Thanks! |
Pages: 1 2