From 973db5e05881de356d3b64f4ce150fb116fddffd Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 2 Jan 2023 20:17:01 +0100 Subject: [PATCH] Add -i to shape.c for testing ShapeInput --- tests/shape.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)); -- 2.34.1