[compiz] Q's on how compiz works
andrew.r.rader at gmail.com
Mon Apr 7 10:36:51 PDT 2008
I've recently become interesting in how all of the pieces of X/compiz
come together to do what it does, and after going through compiz's
code, I have a few questions that I just can't seem to find any
My basic understanding is that compiz sets up compositing, and then
using either the root window or the composite overlay window it sets
up an area for opengl to draw to. Using the composite extension,
compiz grabs pixmaps from windows, binds them to textures, and draws
objects using opengl using this texture in order to display the
contents of the window.
Assuming the above is correct, I have two primary questions:
first, how does compiz know what geometry to use for the textured
"window" objects? It obviously can't use the width and height of the
window, since opengl's coordinates are going to be much different (ie.
between -1 and 1). I tried looking through the code, but I can't find
anything that appears to convert from X window coords to OpenGL
second, how is the user's input mapped to windows? If my understanding
of compiz being an opengl app is correct, any input will be to the
compiz window rather than the window the user perceives to be active.
Is there a simple way of redirecting these inputs? or does compiz have
to manually map an input event to the correct window?
More information about the compiz