Covering the desktop with a window doesn't work, because if you click in the window then the program is moved to the front (and there's no way to stop this) and the window covers everything.
If you keep the window in the background, for example by creating it in an extension or application extension, then it doesn't get updated and it doesn't respond to clicks. You can create it in an extension if you go to the system zone. You can create it in an application extension when you use InitGraf and InitWindows, but no other inits.
There are 3 ways in which the desktop is drawn:
- Draw the desktop picture or pattern.
- Update the desktop window between BeginUpdate and EndUpdate.
- When you click in the desktop then it draws directly in the screen port.
I wrote a little extension to find out who creates the desktop window and which parameters are used. The desktop window is created by Finder with proc ID 2048 = WDEF 128. WDEF 128 is a pointer to a function in Finder. If I can guess how this WDEF works, then I can replace Finder. Deselecting the option "Show desktop when in background" = making the desktop window invisible = moving it to {-x,-x}. This would be the simplest solution that has no particular reason to crash, compared to an exotic extension.
I'm now looking into Finder for instructions that you don't find in a normal application, like CalcVis. Then I may guess how they do it.