XShape example usage?

Felix Schütt felixschuett at outlook.de
Thu Dec 21 11:51:49 UTC 2017


Hello,

I am currently trying to create a custom shape for a simple X11 window 
(mostly for a splash screen). Based on the lacking documentation on 
https://www.x.org/archive/X11R7.5/doc/man/man3/XShape.3.html I can 
however not find any way to do it. Is there a possiblity of some example 
/ testing code available somewhere? I can't figure out how I should use 
XShape to create a non-rectangular window.

My second question regards context menus and borderless windows. In a 
regular X11 window, I can set the background to be transparent -however, 
if I do that, I still have the shadows (drawn by the WM) around the 
window. Is there any way in the X11 protocol or its extensions to 
disable the shadow (to have a true transparent window)? I have often 
wondered how context menus are handled - in many ways they seem like 
regular windows, however they don't have the usual borders of  a window. 
For example, if I disable window decorations in Ubuntu Unity, the window 
borders are still rounded. Context menus, on the other hand, do not have 
any rounded borders. So they must be doing some kind of trick to get a 
simple rectangular window working. I asked other people and they told me 
that these developers are using XShape extensions. Is this true or is 
there another way to do context menus?


Thanks in advance,

Felix Schütt



More information about the xorg mailing list