--- backfill hook:
{
SetAPen( rp, 3 );
RectFill( rp, 1, 1, WIDTH-1, HEIGHT-1 );
....
}
This is deadly wrong:
1. your must not use the RastPort given. It is for information only. You may only use rp->BitMap for rendering. If you need a RastPort, create your own one or copy the one given and move NULL to temp_rp->Layer.
2. you must respect the bounds given in the message. If you always fill the entire window, you overwrite everything including gadgets already drawn.
See Intuition/OpenWindow autodocs for a description of WA_BackFill and follow its link to layers/InstallLayerHook autodocs to read the essential hints.
Bye,
Thomas