projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66ddef1
)
watch out for prototypes when making child surfaces
author
Dana Jansens
<danakj@orodu.net>
Mon, 26 May 2003 16:37:14 +0000
(16:37 +0000)
committer
Dana Jansens
<danakj@orodu.net>
Mon, 26 May 2003 16:37:14 +0000
(16:37 +0000)
render2/surface.c
patch
|
blob
|
history
diff --git
a/render2/surface.c
b/render2/surface.c
index 003dadd38fb9174ebfd414187c2a3d5436bbda19..23f2d107b05128d122700f2593cb457bcd5ded5b 100644
(file)
--- a/
render2/surface.c
+++ b/
render2/surface.c
@@
-53,6
+53,10
@@
struct RrSurface *RrSurfaceNewChild(enum RrSurfaceType type,
{
struct RrSurface *sur;
+ /* cant be a child of a prototype! */
+ assert(parent->inst);
+ if (!parent->inst) return NULL;
+
sur = surface_new(type, numtex);
sur->inst = parent->inst;
sur->win = None; /* XXX XCreateWindow? */
@@
-102,6
+106,10
@@
struct RrSurface *RrSurfaceCopyChild(struct RrSurface *orig,
{
struct RrSurface *sur;
+ /* cant be a child of a prototype! */
+ assert(parent->inst);
+ if (!parent->inst) return NULL;
+
sur = surface_copy(orig);
sur->inst = parent->inst;
sur->win = None; /* XXX XCreateWindow? */