[Xquartz-dev] AppleWM_xshadow.c (Re: X11 window appearance)
Eeri.Kask at inf.tu-dresden.de
Sun Oct 11 10:41:27 PDT 2009
for everybody interested here is a polished variant of the client
window drop-off shadow creation tool aimed for window managers other
than quartz-wm. (I have tested openbox, vtwm, and few others such
There are no advancements in understanding the spoken
XAppleWMFrameDraw() 'inner' and 'outer' parameters, and I left these
unchanged (0, 0, w, h) as by experimentation they seem to best fit
for the purpose: we even have XShape'd clients with drop-off shadows
The initial AppleWM_xshadow.s variant showed one significant
behavioural difference on Tiger and Leopard respectively: it
appeared, on Leopard the clients making use of Xft truetype (or
XRender?) subsystem, e.g.
xterm -fa 'monospace-10'
(or gvim), if enlarging such a client by resize they start showing
transparent background for text pixels in new, enlarged areas.
Though, if calling XAppleWMFrameDraw() with the updated window size,
these transparent areas turn into opaque as would be otherwise
correct. Let me understress: if these applications are foced to use
X11-core fonts, this transparency phenomenon doesn't occur and all
So it looks like one has to track ConfigureNotify events too, and
call the above function in response. This is kind of interesting as
the coregraphics (or Xplugin?) tracks all other configure-notify
situations: client location and X11-window border size; and
re-renders the shadow accordingly anew.
Last but not least, under Tiger (XFree86-X11) this
resize-transparency phenomenon regrading Xft/XRender does not occur.
Therefore should this issue get clarified one day, one can remove
"#define TRACK_CONFIGURENOTIFY"-enclosed code in AppleWM_xshadow.c.
P.S. One remaining issue is how to influence the drop-off shadow
size and color for Xquartz clients; according to the documentation
it looks like coregraphics by itself supports windows having
customised, even coloured shadows. :-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Xquartz-dev