X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Ftest.c;h=55ab621eac39954f92d637a5cc743b9edf806071;hb=3c688bc4a75436a457d3ce693eda6bd6b329412f;hp=c867cf782b77dc0a4ee6c9bc5eac22ebdac2f7cc;hpb=d9f14c1d010860e658f4a9adc6682e0264b410aa;p=chaz%2Fopenbox diff --git a/render/test.c b/render/test.c index c867cf78..55ab621e 100644 --- a/render/test.c +++ b/render/test.c @@ -2,7 +2,7 @@ test.c for the Openbox window manager Copyright (c) 2006 Mikael Magnusson - Copyright (c) 2003 Ben Jansens + Copyright (c) 2003-2007 Dana Jansens Copyright (c) 2003 Derek Foreman This program is free software; you can redistribute it and/or modify @@ -44,6 +44,7 @@ gint main() Window win; RrInstance *inst; RrAppearance *look; + int done; Window root; XEvent report; @@ -55,7 +56,7 @@ gint main() ob_root = RootWindow(ob_display, ob_screen); win = XCreateWindow(ob_display, RootWindow(ob_display, 0), - 10, 10, w, h, 10, + 10, 10, w, h, 10, CopyFromParent, /* depth */ CopyFromParent, /* class */ CopyFromParent, /* visual */ @@ -67,8 +68,10 @@ gint main() inst = RrInstanceNew(ob_display, ob_screen); look = RrAppearanceNew(inst, 0); - look->surface.grad = RR_SURFACE_PYRAMID; + look->surface.grad = RR_SURFACE_MIRROR_HORIZONTAL; 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.interlaced = FALSE; if (ob_display == NULL) { @@ -76,8 +79,20 @@ gint main() return 0; } +#if BIGTEST + int i; + look->surface.pixel_data = g_new(RrPixel32, w*h); + for (i = 0; i < 10000; ++i) { + printf("\r%d", i); + fflush(stdout); + RrRender(look, w, h); + } + exit (0); +#endif + RrPaint(look, win, w, h); - while (1) { + done = 0; + while (!done) { XNextEvent(ob_display, &report); switch (report.type) { case Expose: @@ -87,8 +102,10 @@ gint main() report.xconfigure.width, report.xconfigure.height); break; + case UnmapNotify: + done = 1; + break; } - } RrAppearanceFree (look);