Am 09/12/2009 07:09 PM, Jeremy Huddleston schrieb:
(1) What are these inner_x, inner_y, inner_w, inner_h parameters in particular?
Those are the parameters of the "inner" window. That is, the contents. The "outer" window is what contains the inner window as well as all the decoration.
Unfortunately I still don't grasp the idea... :-) I was in opinion these inner_? (and outer-?) parameters denote some rectangular area, with coordinates relative to the corresponding X11-window origin on the screen; therefore an area sized (w+2b, h+2b) at offset (-b,-b) exactly encloses the X11-window area including its border. But apparently this opinion is wrong.
(2) Not knowing any better I chose 'AppleWMFrameClassBorderless' as this seemed most appropriate to denote the CoreGraphics not to put any of the usual Aqua title-bars, drag-knobs, its own border, etc around the final result. In fact, what does this 'class' parameter like 'AppleWMFrameClassDocument' denote, regarding the shadow drawing, if it affects anything at all?
I think it should have no shadow. That's used for menus, tooltips, splash screens, etc.
The applewm.h file lists these frame classes: AppleWMFrameClassDocument AppleWMFrameClassDialog AppleWMFrameClassModalDialog AppleWMFrameClassSystemModalDialog AppleWMFrameClassUtility AppleWMFrameClassToolbar AppleWMFrameClassMenu AppleWMFrameClassSplash AppleWMFrameClassBorderless and I originally took the last one. It appears each and everyone of these looks the same-shadowed after being rendered, I did try all of them in PaintShadow() in the aforementioned program and I could not notice any difference in the shadow-decorated window appearance. (They all look the way I wished them to look like.)
(4) Most important unresolved issue is termination: how to withdraw the shadows by means of Apple-WM extension? In particular, if quartz-wm is started manually, and terminated by Ctrl-C, then it withdraws all shadows. How does it do that? :-)
it unmaps the window and reparents it to the root window.
Yes now I understand. The reparented window has an ID unknown to the CoreGraphics and so it doesn't get any shadow while re-mapping.
I didn't look at the code, but if you still need help, I'll be able to look at it on Monday.
Oh thanks for the offer... if you spot any bugs please let me know! :-) (To be serious, I would be glad to exactly understand these inner_? and outer_? parameters; as well as the AppleWMFrameClass??? intended purpose, at least to confirm this parameter is irrelevant to that small program.) Thanks again, Eeri Kask