Crutch
Well-known member
OK this actually works!
1. Move every window manually by calling MovePortTo, then OffsetRgn on both the structure and content regions
2. UnionRgn the "before" and "after" regions of each window's strucRgn into a big cumulative updateRgn
3. Then, for each Layer*, call PaintBehind then CalcVisBehind on FrontWindow using the updateRgn
That's it! It takes care of all updating, including the desktop areas. It is MUCH MUCH faster than calling MoveWindow a bunch of times, presumably because now I am only updating the exposed regions once per layer instead of once per moved window. Excellent.
*This is necessary because otherwise PaintBehind and CalcVisBehind ignore background windows for other layers, leaving weird artifacts on the desktop. To do this I used the GetCurLayer and SetCurLayer calls from the Layer Manager header you awesomely showed me @cheesestraws ... which work precisely as one would expect them to. Thanks again.
I will clean this up a little over the next few days, then add the zoom rects and post a little preview video showing it in action.
1. Move every window manually by calling MovePortTo, then OffsetRgn on both the structure and content regions
2. UnionRgn the "before" and "after" regions of each window's strucRgn into a big cumulative updateRgn
3. Then, for each Layer*, call PaintBehind then CalcVisBehind on FrontWindow using the updateRgn
That's it! It takes care of all updating, including the desktop areas. It is MUCH MUCH faster than calling MoveWindow a bunch of times, presumably because now I am only updating the exposed regions once per layer instead of once per moved window. Excellent.
*This is necessary because otherwise PaintBehind and CalcVisBehind ignore background windows for other layers, leaving weird artifacts on the desktop. To do this I used the GetCurLayer and SetCurLayer calls from the Layer Manager header you awesomely showed me @cheesestraws ... which work precisely as one would expect them to. Thanks again.
I will clean this up a little over the next few days, then add the zoom rects and post a little preview video showing it in action.