

I have to do this from inside my patch of _GetNextEvent (which is called by _WaitNextEvent) but I think it will be OK, I set a flag to prevent endless recursion. The ‘0’ is so that I don’t actually intercept any events.
#WIZARDRY MINI VMAC UPDATE#
However it instantly gets an update event if a window above it is hidden (not moved) and it still hidden the next time the Finder gets time (via _WaitNextEvent). It seems that the Finder (running 7.5.5) eventually gets an update event and redraws anything on the desktop whenever a window above it is moved … but it can take up to a second. Documenting here for the record, this is very wonky … 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. which work precisely as one would expect them to. To do this I used the GetCurLayer and SetCurLayer calls from the Layer Manager header you awesomely showed me. *This is necessary because otherwise PaintBehind and CalcVisBehind ignore background windows for other layers, leaving weird artifacts on the desktop. 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. That's it! It takes care of all updating, including the desktop areas. Then, for each Layer*, call PaintBehind then CalcVisBehind on FrontWindow using the updateRgn UnionRgn the "before" and "after" regions of each window's strucRgn into a big cumulative updateRgnģ. Move every window manually by calling MovePortTo, then OffsetRgn on both the structure and content regionsĢ.
