[cairo] Cairo and multiple X11 windows

Owen Taylor otaylor at redhat.com
Fri Aug 1 10:29:14 PDT 2008


On Fri, 2008-08-01 at 12:13 -0400, Jim Gettys wrote:
> 
> 
> On Fri, 2008-08-01 at 15:30 +0200, W.Boeke wrote:
> 
> > 
> > Are you shure that creating many windows in X is inefficient? My program
> > instantiates 100's of them, still the graphics are fast, even on an old
> > slow box and on the Asus eeePC. Running the 'top' command reveals that the
> > CPU is hardly occupied by the graphics, only when a window must be redrawn
> > because it is becoming less obscured by other windows. In this case
> > it probably makes no difference whether you have one big window or many
> > subwindows however.
> 
> Subwindows in X are indeed quite efficient.
> 
> But most of the modern tookits (e.g. Qt, GTK+) are cross platform, and
> written therefore to work despite the lack of efficient subwindows on
> other platforms.... Ergo the decline in subwindow's use...

Also, rectangular opaque boxes are not as popular in user interfaces as
they once were.

Yes, you can get alpha compositing with subwindows if the application 
acts as a compositing manager for its own subwindows, but there's a lot
of complexity there, and portability becomes even sticker.

Much easier usually to just draw whatever you want into a single window.

- Owen




More information about the cairo mailing list