Xlib: Compositing a window
3rlendhl at gmail.com
Fri Apr 29 14:09:34 UTC 2016
I'm working in Linux, using C++ and g++.
I need to do compositing on the children of a window. That is, draw the
(ARGB) children onto their parent window, which is just a normal window WRT
the window manager, but I'm having a series of problems.
First my setup so far. This is a test, in which I don't care about Damage
but try to continuously do compositing.
demo_window is then the child of main_window. XConnection is just a wrapper
for the typical `Display* dpy;`, which currently just has some functions to
create windows (https://bpaste.net/show/9b3ea8ef0fc9)
The first problem is that nothing appears in the window when I comment out
line 41. I'm unsure how it normally works, but I suppose that when I do
compositing, then I want the windows to be entierly off screen, so I don't
want to `XMapWindow` them. Please correct me if I'm wrong.
[[Notice also that for my application, the main application creates the
child windows and sends the window ID to the child process (the process
also immediately starts at line 46). Furthermore, the process will create
an ARGB glX context on the window it is given. Without my attempt at
compositing, it works fine with one window.]]
Another problem is that once I try to listen for Damage events, it only
happens once, in the start. Generally I only want to know when damage
happens, not which parts are damaged etc. What did I miss here?
And a final question: Looking at xcompmgr source code, it uses 'Regions'
from the Xfixes extension, such as XFixesCreateRegion etc. Will I need that
in my quest to do simple compositing without consideration to exactly which
area is damaged?
So my quest is to assemble the bare essentials of compositing several ARGB
windows onto one window. I have probably skipped something essential, but I
do find it quite hard to find out exactly what I need to do (have any
general tips on how to get around the poor documentation of some parts of
Xlib?). I really hope someone can help me out. If I have omitted some
important detail, please tell me what I need to provide.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg