From d447cc22bb5e46fcb9bde464419b9b7114eaffb9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 26 May 2003 16:48:59 +0000 Subject: [PATCH] create windows for children --- render2/surface.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; } -- 2.34.1