REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)
exxos blog - random goings on
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
This is quickly turning into a small nightmare again :roll:
Even if I close the main GB7 window and only trigger events on the new window, which is a different ID and handle, the previous window routines are still somehow triggering which does not make sense.So I think trying to open two windows even if there is only one open at a time it is going to involve another total rewrite of the GB7 core. But as I don't know what is wrong in the first place...
Really I should reuse the main GB7 window. But the problem is there is that the redraw routines are geared up to draw the results etc. so displaying another bunch of information would then put even more clauses into what to do and what not to draw in the window :roll:
EDIT:
So the AES window handle goes wonky in all this which is why is running the previous drawing routines. The main window handle is normally "3" an additional window is normally "4". however when you close the main window "3". The handle for the now window open also becomes "3". The only way to stop the handles some changing is to keep the window open.. Which then screws up the AES three drawing routines.. So damned if do and damned if don't all the time :roll:
Even if I close the main GB7 window and only trigger events on the new window, which is a different ID and handle, the previous window routines are still somehow triggering which does not make sense.So I think trying to open two windows even if there is only one open at a time it is going to involve another total rewrite of the GB7 core. But as I don't know what is wrong in the first place...
Really I should reuse the main GB7 window. But the problem is there is that the redraw routines are geared up to draw the results etc. so displaying another bunch of information would then put even more clauses into what to do and what not to draw in the window :roll:
EDIT:
So the AES window handle goes wonky in all this which is why is running the previous drawing routines. The main window handle is normally "3" an additional window is normally "4". however when you close the main window "3". The handle for the now window open also becomes "3". The only way to stop the handles some changing is to keep the window open.. Which then screws up the AES three drawing routines.. So damned if do and damned if don't all the time :roll:
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
So what I can gather currently is the main GB7 window content is not updating correctly and the actual content is ending up on the second window :shrug:
I don't really see how that can happen because I have separate AES handles for both Windows.I even recheck the handles and the new one is opened in case they have changed. I don't get it.
I suppose the cheating way is to just redraw the whole window and force it to be on top when the redraw happens.
Obviously I cannot redraw the whole window when it is a background window otherwise it will overwrite the window contents which is on top.
I don't really see how that can happen because I have separate AES handles for both Windows.I even recheck the handles and the new one is opened in case they have changed. I don't get it.
I suppose the cheating way is to just redraw the whole window and force it to be on top when the redraw happens.
Obviously I cannot redraw the whole window when it is a background window otherwise it will overwrite the window contents which is on top.
-
stephen_usher
- Site sponsor

- Posts: 7439
- Joined: 13 Nov 2017 19:19
- Location: Oxford, UK.
Re: exxos blog - random goings on
Surely you need to detach the drawing routines from the window handle before closing the window?
Remember that GEM is a first generation (and very rudimentary) WIMP system and it doesn't do a lot for you underneath. You have to manually clean up before closing windows. This also explains why if you close a window with a low handle number and then open a new window it will reuse that low numbered handle as it will just do a simple search for the first free handle in the list.
Remember that GEM is a first generation (and very rudimentary) WIMP system and it doesn't do a lot for you underneath. You have to manually clean up before closing windows. This also explains why if you close a window with a low handle number and then open a new window it will reuse that low numbered handle as it will just do a simple search for the first free handle in the list.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
It seems the AES simply didn't process the event at all. So no redraw messages *** . In which case making the window on top and full redraw might be the only way.
*** I output a dump of events to a file. It does actually trigger MOVE event, that works, and 1 REDRAW event, but not sure what its actually redrawing.
*** I output a dump of events to a file. It does actually trigger MOVE event, that works, and 1 REDRAW event, but not sure what its actually redrawing.
You do not have the required permissions to view the files attached to this post.
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
OH it does send a redraw event, but only the overlapping section :WTF:
You do not have the required permissions to view the files attached to this post.
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
I did a event dump of the window move below.
30 = WM_UNTOPPED
28 = WM_MOVED
20 = WM_REDRAW
3 = main window
4 = new window
Will draw a black square on every event next to see what its actually doing...
Code: Select all
EVENT AES X Y W H
30 3 0 0 0 0
28 3 376 142 628 332
20 3 219 141 281 305
20 4 216 123 160 327
20 4 376 123 120 19
30 4 0 0 0 0 28 = WM_MOVED
20 = WM_REDRAW
3 = main window
4 = new window
Will draw a black square on every event next to see what its actually doing...
You do not have the required permissions to view the files attached to this post.
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
Code: Select all
28 3 375 132 628 332
20 3 219 141 281 305
20 4 216 123 159 327
20 4 375 123 121 9 Next same black square over the GB7 main window...okay I guess..
Then a redraw which is almost right, but still nothing in the big gap on the GB7 main window.
So it seems impossible to redraw a background window... but it does work when only the main GB7 window is open, in respect to desktop windows that is. :crazy:
You do not have the required permissions to view the files attached to this post.
-
HigashiJun
- Posts: 2388
- Joined: 19 Jun 2020 07:21
- Location: Tokyo
Re: exxos blog - random goings on
It reminds me of a movie called "The NeverEnding story"...
:lol:
The film score was nice, though.
https://www.youtube.com/watch?v=2WN0T-Ee3q4
Cheers.
:lol:
The film score was nice, though.
https://www.youtube.com/watch?v=2WN0T-Ee3q4
Cheers.
-
exxos
- Site Admin

- Posts: 28575
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: exxos blog - random goings on
Was on of my favorite films when I was a kid :)
-
Badwolf
- Site sponsor

- Posts: 3055
- Joined: 19 Nov 2019 12:09
Re: exxos blog - random goings on
I don't know if this will help at all, @exxos?
This was a little test window program I wrote a while back. Should be compilable with Pure C (there's a PRJ file in there).
All it does it display a single window, so you need desk accessories or a multitasking environment to get the best out of it, but it draws some text and some background fill and everytime it draws a new background rectangle it changes the colour index so you can see what it's done. It doesn't do anythign clever, IIRC. I think it just redraws the whole window with clipping enabled.
In effect, it's explaining the dirty rectangle list visually.
Perhaps disable the text rendering would help further?
Anyway, YMMV, but here you go.
BW
PS: this is probably the most pertinent function
This was a little test window program I wrote a while back. Should be compilable with Pure C (there's a PRJ file in there).
All it does it display a single window, so you need desk accessories or a multitasking environment to get the best out of it, but it draws some text and some background fill and everytime it draws a new background rectangle it changes the colour index so you can see what it's done. It doesn't do anythign clever, IIRC. I think it just redraws the whole window with clipping enabled.
In effect, it's explaining the dirty rectangle list visually.
Perhaps disable the text rendering would help further?
Anyway, YMMV, but here you go.
BW
PS: this is probably the most pertinent function
Code: Select all
void redraw_window( int handle, GRECT *dirty ) {
int wx, wy, ww, wh;
int pxy[4];
int clip[4];
int i;
GRECT r;
graf_mouse( M_OFF, 0L );
wind_update( BEG_UPDATE );
wind_set( handle, WF_VSLSIZE, vslidersz, 0,0,0 );
i = 0;
wind_get( handle, WF_FIRSTXYWH, &r.g_x, &r.g_y, &r.g_w, &r.g_h );
while( r.g_w > 0 && r.g_h > 0 ) {
if( rc_intersect( dirty, &r ) ) {
set_clip( TRUE, r );
draw_window_content( handle );
set_clip( FALSE, r );
}
wind_get( handle, WF_NEXTXYWH, &r.g_x, &r.g_y, &r.g_w, &r.g_h );
}
wind_update( END_UPDATE );
graf_mouse( M_ON, 0L );
}
You do not have the required permissions to view the files attached to this post.
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
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Who is online
Users browsing this forum: ClaudeBot, Google [Bot], Perplexity [Bot] and 15 guests