2

I'm writing a simple window manager as a hobby project, and I've chosen python and xlib to implement it. I'd like to have some fancy effects like windows sliding from left and right, and from what I've been able to dig up, the best way to go about this is to use the composite extension to render windows to offscreen buffers, and then manipulate those buffers and paint them however I want.

However, with python-xlib documentation somewhat lacking, I found no way to do this, and I haven't found any examples of using python-xlib with the composite extension. Where can I find this information, and has anyone used python-xlib with composite?

I suppose I could always switch to xcb which seems to support composite for python, but I'd prefer not having to rewrite the whole thing and figure out a different API with somewhat lacking python documentation.

To summarize, my questions are:

  • Is there a way to use composite with python-xlib?
  • Would it be a better idea to switch to xcb for this?

Any additional suggestions and advice are welcome.

1 Answer 1

2

Yes, there is support for Composite extension in python-xlib. Take a look at extension client implementation You'll probably need composite_redirect_window and composite_name_window_pixmap

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.