You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296

exxos blog - random goings on

Blogs & guides and tales of woo by forum members.
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

Thanks @Badwolf . indeed "walking the rectangle list" is done. The AES just seems to get confused somehow when 2 windows are open.

Its odd the AES even draws in my new window. It could be issuing redraw events before the window has actually moved. But not sure how that could really happen. It shouldn't be drawing on the on top window when the window being moved is behind the new window. It would make sense if the main window was on top, but it isn't.

I never used mint etc. But assume clicking a window and moving it, doesn't actually make it the selected on top window ? Currently making it the top window and doing a full redraw seems the only solution.
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 2719
Joined: Tue Nov 19, 2019 12:09 pm

Re: exxos blog - random goings on

Post by Badwolf »

exxos wrote: Wed Jan 04, 2023 2:41 pm Thanks @Badwolf . indeed "walking the rectangle list" is done. The AES just seems to get confused somehow when 2 windows are open.
Unless that's a basic issue, I can't imagine it's the AES getting confused. Multiple windows are a fairly common occurance!
Its odd the AES even draws in my new window. It could be issuing redraw events before the window has actually moved. But not sure how that could really happen. It shouldn't be drawing on the on top window when the window being moved is behind the new window. It would make sense if the main window was on top, but it isn't.

I never used mint etc. But assume clicking a window and moving it, doesn't actually make it the selected on top window ? Currently making it the top window and doing a full redraw seems the only solution.
That's down to the indivdual AES rather than MiNT per se, but normally clicking on a window tops it. Is that what's going wrong, you're missing the WM_TOPPED event and it's asking you to redraw the area that was previously occluded?

EDIT: actually I see that XaAES doesn't top on move.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 2719
Joined: Tue Nov 19, 2019 12:09 pm

Re: exxos blog - random goings on

Post by Badwolf »

I've just hacked my program to stop drawing the text and to open two windows instead:-

Screenshot_2023-01-04_15-38-30.png
Screenshot_2023-01-04_15-38-30.png (18.22 KiB) Viewed 1625 times

I think that's working as intended. I moved the second (lower, underlapped) window out without topping it and the dark grey area was redrawn only.

Source attached.

BW
Attachments
2windows.zip
(78.02 KiB) Downloaded 49 times
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

Badwolf wrote: Wed Jan 04, 2023 3:40 pm I think that's working as intended. I moved the second (lower, underlapped) window out without topping it and the dark grey area was redrawn only.
Thanks. It doesn't look like I do anything any different. Though your example would be doing the same as mine does. Only I use black squares to denote what areas the AES is sending.

I wonder if I'm missing some events somehow. Can't check now as not at home. But I'd assume , as you say, dragging the bottom window causes the exposed area to redraw. But aside from the redraw message , not sure what else would be needed ?

Multiple windows only work with one GB7 window open. Opening a directory on desktop and moving either windows about all works fine. Its not until I open 2 GB7 windows ( same program) that things get messed up. Both windows have their own handle and draw routines.

Maybe there is something FUBAR in the HISOFT libs somewhere. I'm fast running out of ideas now. I know the WINDOWS READ in basic screws up if you call it over 1,000 times or something. So there are bugs somewhere.
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 2719
Joined: Tue Nov 19, 2019 12:09 pm

Re: exxos blog - random goings on

Post by Badwolf »

exxos wrote: Wed Jan 04, 2023 4:11 pm Multiple windows only work with one GB7 window open. Opening a directory on desktop and moving either windows about all works fine. Its not until I open 2 GB7 windows ( same program) that things get messed up. Both windows have their own handle and draw routines.
I think the only key thing there is that msg_buf[3] indicating the window handle during the WM_REDRAW event. I presume you're then deciding which draw routine to call based on a look-up against that ID?

Is that code robust (no off-by-one error or similar)?
Maybe there is something FUBAR in the HISOFT libs somewhere. I'm fast running out of ideas now. I know the WINDOWS READ in basic screws up if you call it over 1,000 times or something. So there are bugs somewhere.
Could very well be.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

Badwolf wrote: Wed Jan 04, 2023 4:38 pm I think the only key thing there is that msg_buf[3] indicating the window handle during the WM_REDRAW event. I presume you're then deciding which draw routine to call based on a look-up against that ID?

Is that code robust (no off-by-one error or similar)?

Code: Select all

'GB7 MAIN WINDOW
if mess(3)=our_aeshandle then
if mess(0)= WM_MOVED THEN vs_color 0,1000,0,0 : UDSCREEN2 mess(4),mess(5),mess(6),mess(7),0: EXIT IF 'red 
if mess(0)=wm_redraw AND e<>1 then CALL UDS: vs_color 0,0,1000,0 : redraw mess(4),mess(5),mess(6),mess(7): EXIT IF ' green FROM AESDEMO
if mess(0)=WM_NEWTOP AND e<>1  then CALL UDS:vs_color 0,0,0,1000 :  call full_redraw ' blue window clicked on
end if


'INFO WINDOW MOVED
if mess(3)=our_aeshandle2 then
if mess(0)= WM_MOVED THEN 
WINDOW LOCATE INFOID,mess(4),mess(5),mess(6),mess(7)
junk=wind_get(our_aeshandle2,WF_WORKXYWH,x,y,w,h) ' get work area of the main window (internal)
junk=wind_update(1)
base_redraw x,y,w,h
junk=wind_update(0)
end if
END IF
The handles are different. Of course the info window I am not really doing much with yet as its the main GB7 window which gets trashed.

In this post viewtopic.php?p=96297#p96297 I only get the move window event and one redraw event.

The red parts what is returned by the intersection routine. And the black parts is what is returned in the REDRAW events.

Capture.PNG
Capture.PNG (67.16 KiB) Viewed 1586 times

I don't know why the main GB7 window gets drawn on the top window yet either.
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

How it is currently it works. The when clicking the GB7 main window which is under the new window, when it is clicked on it automatically brings it to the front. This must be something HISOFT is doing because I do not process any other messages other than REDRAW and MOVE currently.

Currently I am not really sure how you are supposed to move a window with AES functions @Badwolf ?

EDIT:

Found it in your code

Code: Select all

case WM_MOVED:
				wind_set( msg_buf[3], WF_CURRXYWH, msg_buf[4],
					msg_buf[5], msg_buf[6], msg_buf[7] );
And I don't bloody believe it but it seems to be behaving now :roll: Need to do more testing though.
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

The test video..




So it seems the HISOFT WINDOW LOCATE function is totally broken then :roll: Even the odd redraw issues in the new top window have even vanished now. :shock:

So no bloody wonder it has taken me so long to track down this problem. Because the problem isn't actually with my code it is built into the HISOFT libraries which I was essentially debugging :pullhair:

This is also why I stopped writing software in Windows, because I was spending more time debugging the dll's in Windows than debugging my own code :lol: :roll:
User avatar
exxos
Site Admin
Site Admin
Posts: 25753
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: exxos blog - random goings on

Post by exxos »

Been doing a lot of tests. On occasion a desktop window doesn't seem to get refreshed. But not sure the cause of that.

Also the redraw events trigger twice which is odd. Its the same events as well. So maybe I need to clear the event variables after doing a event. I kind of assumed event multi would basically do that the next time its called anyway :shrug:

EDIT:

The first problem may be because I still have WINDOW LOCATE for the second window.

The second problem might be because I need a second "exit if" in the moved event line. But could be other issues as well.
User avatar
HigashiJun
Posts: 1934
Joined: Fri Jun 19, 2020 7:21 am
Location: Tokyo

Re: exxos blog - random goings on

Post by HigashiJun »

exxos wrote: Wed Jan 04, 2023 10:25 am
HigashiJun wrote: Wed Jan 04, 2023 9:11 am It reminds me of a movie called "The NeverEnding story"...
Was on of my favorite films when I was a kid :)
Yup, a good film indeed.

I guess a lot of kids cried when Artax the horse died in the swamps... :cry:

Artax.gif
Artax.gif (1.22 MiB) Viewed 1573 times

(Even if it came back to life at the end).
Post Reply

Return to “MEMBER BLOGS”