From: Dana Jansens Date: Mon, 26 May 2003 16:48:59 +0000 (+0000) Subject: create windows for children X-Git-Tag: gl2~119 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d447cc22bb5e46fcb9bde464419b9b7114eaffb9;p=dana%2Fopenbox.git create windows for children --- diff --git a/render2/surface.c b/render2/surface.c index 23f2d107..b0063da5 100644 --- a/render2/surface.c +++ b/render2/surface.c @@ -21,6 +21,13 @@ static struct RrSurface *surface_new(enum RrSurfaceType type, return sur; } +static Window create_window(struct RrInstance *inst, Window parent) +{ + return XCreateWindow(RrDisplay(inst), parent, 0, 0, 1, 1, 0, + RrDepth(inst), InputOutput, RrVisual(inst), + 0, NULL); +} + struct RrSurface *RrSurfaceNewProto(enum RrSurfaceType type, int numtex) { @@ -59,7 +66,7 @@ struct RrSurface *RrSurfaceNewChild(enum RrSurfaceType type, sur = surface_new(type, numtex); sur->inst = parent->inst; - sur->win = None; /* XXX XCreateWindow? */ + sur->win = create_window(sur->inst, parent->win); sur->parent = parent; sur->parentx = 0; sur->parenty = 0; @@ -112,7 +119,7 @@ struct RrSurface *RrSurfaceCopyChild(struct RrSurface *orig, sur = surface_copy(orig); sur->inst = parent->inst; - sur->win = None; /* XXX XCreateWindow? */ + sur->win = create_window(sur->inst, parent->win); sur->parent = parent; return sur; }