supporting non-rectangular windows

Prasanta Sadhukhan psadhukhan at
Mon Jan 31 00:05:05 PST 2011

Thanks for the pointer. I saw that the example use widget API through
XCreateManagedWIdget APIs.
Are this required to use the shape extension API to work?

I wanted to use the shape API without this if possible. I tried a small
example of creating a circular window which will have 2 diagonal line in it
and the window should close when any button is pressed inside it. Attached
is the c program I tried but it is not creating any window and is hanging
inside XNextEvent() call
Can anyone please point to me as to what is wrong in this program. I am a
newbie to X-programming

Also, one more question regarding events is
what difference does it make if we call XSelectInput or XShapeSelectInput?
Do we always need to use XShapeSelectInput if we have set a shape on the
window? Or are there cases in which we would want to use XSelectInput with a
shaped window?

Thanks in advance

On Mon, Jan 24, 2011 at 9:14 PM, Alan Coopersmith <
alan.coopersmith at> wrote:

> On 01/24/11 03:34 AM, Prasanta Sadhukhan wrote:
> > Thanks for the information. Is there any link which shows an example of
> how to
> > use this APIs for example, if I want to create a rounded-rect window.
> See the oclock sources, which use the shape extension to draw a circular
> clock
> window:
> or
> --
>         -Alan Coopersmith-        alan.coopersmith at
>         Oracle Solaris Platform Engineering: X Window System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xtest.c
Type: text/x-csrc
Size: 3308 bytes
Desc: not available
URL: <>

More information about the xorg-devel mailing list