BurntSushi / xgbutil

A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)
Do What The F*ck You Want To Public License
194 stars 46 forks source link

Transparent Child Window #33

Closed wiless closed 8 years ago

wiless commented 8 years ago

How do I create a transparent child window ?

This is how I create a child window under a root window

win, err := xwindow.Generate(xu)
win.Create(parent, X,Y, Width,Height, xproto.CwBackPixel, 0xfffff)

Is it something to do with the valuemasks xproto.CwBackPixel ?

Any pointer will be very helpful. Thanks.

BurntSushi commented 8 years ago

You need to run a compositor to get a transparent window. It's totally out of scope for this package.

CamilleScholtz commented 8 years ago

I have a question related to this issue, I made Wingo accept png images (that get converted to xpm or whatever with xwindow) as window decorations, I want to use this to get a rounded corner effect, however, the alpha pixels show up as black instead of transparent, and yes, I am running a compositor. Do you know what causes this?

BurntSushi commented 8 years ago

@onodera-punpun Sorry, I don't. I wouldn't necessarily count on the transparency in png to translate to the X image format in such a way that a compositor would handle it correctly.