From: Mikael Magnusson Date: Mon, 2 Jan 2023 19:17:01 +0000 (+0100) Subject: Add -i to shape.c for testing ShapeInput X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=973db5e05881de356d3b64f4ce150fb116fddffd;p=mikachu%2Fopenbox.git Add -i to shape.c for testing ShapeInput --- diff --git a/tests/shape.c b/tests/shape.c index c3de7da3..42245b1b 100644 --- a/tests/shape.c +++ b/tests/shape.c @@ -17,12 +17,13 @@ */ #include +#include #include #include #include #include -int main () { +int main (int argc, char *argv[]) { Display *display; Window win; @@ -47,8 +48,8 @@ int main () { xrect.width = w - 20; xrect.height = h - 20; XShapeCombineRectangles(display, win, - ShapeBounding, 0, 0, &xrect, 1, - ShapeSet, Unsorted); + (argc > 1 && strcmp(argv[1], "-i") == 0) ? ShapeInput : ShapeBounding, + 0, 0, &xrect, 1, ShapeSet, Unsorted); XSetWindowBackground(display,win,BlackPixel(display,0));