make rendertest exit cleanly when it is unmapped (iconify/desktopchange)
This commit is contained in:
parent
83c739df91
commit
ed81992aea
1 changed files with 9 additions and 3 deletions
|
@ -44,6 +44,7 @@ gint main()
|
||||||
Window win;
|
Window win;
|
||||||
RrInstance *inst;
|
RrInstance *inst;
|
||||||
RrAppearance *look;
|
RrAppearance *look;
|
||||||
|
int done;
|
||||||
|
|
||||||
Window root;
|
Window root;
|
||||||
XEvent report;
|
XEvent report;
|
||||||
|
@ -67,8 +68,10 @@ gint main()
|
||||||
inst = RrInstanceNew(ob_display, ob_screen);
|
inst = RrInstanceNew(ob_display, ob_screen);
|
||||||
|
|
||||||
look = RrAppearanceNew(inst, 0);
|
look = RrAppearanceNew(inst, 0);
|
||||||
look->surface.grad = RR_SURFACE_PYRAMID;
|
look->surface.grad = RR_SURFACE_SPLIT_VERTICAL;
|
||||||
look->surface.secondary = RrColorParse(inst, "Yellow");
|
look->surface.secondary = RrColorParse(inst, "Yellow");
|
||||||
|
look->surface.split_secondary = RrColorParse(inst, "Red");
|
||||||
|
look->surface.split_primary = RrColorParse(inst, "Green");
|
||||||
look->surface.primary = RrColorParse(inst, "Blue");
|
look->surface.primary = RrColorParse(inst, "Blue");
|
||||||
look->surface.interlaced = FALSE;
|
look->surface.interlaced = FALSE;
|
||||||
if (ob_display == NULL) {
|
if (ob_display == NULL) {
|
||||||
|
@ -77,7 +80,8 @@ gint main()
|
||||||
}
|
}
|
||||||
|
|
||||||
RrPaint(look, win, w, h);
|
RrPaint(look, win, w, h);
|
||||||
while (1) {
|
done = 0;
|
||||||
|
while (!done) {
|
||||||
XNextEvent(ob_display, &report);
|
XNextEvent(ob_display, &report);
|
||||||
switch (report.type) {
|
switch (report.type) {
|
||||||
case Expose:
|
case Expose:
|
||||||
|
@ -87,8 +91,10 @@ gint main()
|
||||||
report.xconfigure.width,
|
report.xconfigure.width,
|
||||||
report.xconfigure.height);
|
report.xconfigure.height);
|
||||||
break;
|
break;
|
||||||
|
case UnmapNotify:
|
||||||
|
done = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RrAppearanceFree (look);
|
RrAppearanceFree (look);
|
||||||
|
|
Loading…
Reference in a new issue