]> Dogcows Code - chaz/openbox/blobdiff - render/test.c
simply the render interface by not requiring the setting of all the areas. only take...
[chaz/openbox] / render / test.c
index 4dfed619061e22e95bab56e7c1753290b493cfba..9ae7eada2215e3978e8e3adf53fb52fc0d30a6d9 100644 (file)
@@ -21,25 +21,19 @@ Window ob_root;
 int main()
 {
        Window win;
-       GC gc;
-       Pixmap pm;
        Appearance *look;
 
-       int grabbed = 0;
        Window root;
-        XGCValues values;
        XEvent report;
-       int h = 500, w = 500, tmp;
-       XVisualInfo *vi;
-       int i;
+       int h = 500, w = 500;
 
        ob_display = XOpenDisplay(NULL);
        XSetErrorHandler(x_error_handler);
        ob_screen = DefaultScreen(ob_display);
        ob_root = RootWindow(ob_display, ob_screen);
        win =
-           XCreateWindow(ob_display, RootWindow(ob_display, 0)
-                          10, 10, w, h, 10, 
+           XCreateWindow(ob_display, RootWindow(ob_display, 0),
+                          10, 10, w, h, 10, 
                           CopyFromParent,      /* depth */
                          CopyFromParent,       /* class */
                          CopyFromParent,       /* visual */
@@ -55,25 +49,21 @@ int main()
        look->surface.secondary = color_parse("Yellow");
        look->surface.primary = color_parse("Blue");
         look->surface.interlaced = FALSE;
-        look->area.x = 0;
-        look->area.y = 0;
-        look->area.width = 500;
-        look->area.height = 500;
        if (ob_display == NULL) {
                fprintf(stderr, "couldn't connect to X server :0\n");
                return 0;
        }
 
-       paint(win, look);
+       paint(win, look, w, h);
        while (1) {
                XNextEvent(ob_display, &report);
                switch (report.type) {
                case Expose:
                break;
                case ConfigureNotify:
-                       look->area.width = report.xconfigure.width;
-                       look->area.height = report.xconfigure.height;
-                       paint(win, look);
+                       paint(win, look,
+                              report.xconfigure.width,
+                              report.xconfigure.height);
                break;
                }
 
This page took 0.024839 seconds and 4 git commands to generate.