summaryrefslogtreecommitdiff
path: root/xc/test/xsuite/xtest/src/lib/iponlywin.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/test/xsuite/xtest/src/lib/iponlywin.c')
-rw-r--r--xc/test/xsuite/xtest/src/lib/iponlywin.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/xc/test/xsuite/xtest/src/lib/iponlywin.c b/xc/test/xsuite/xtest/src/lib/iponlywin.c
new file mode 100644
index 000000000..ec7451595
--- /dev/null
+++ b/xc/test/xsuite/xtest/src/lib/iponlywin.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright 1990, 1991 by the Massachusetts Institute of Technology and
+ * UniSoft Group Limited.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the names of MIT and UniSoft not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. MIT and UniSoft
+ * make no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * $XConsortium$
+ */
+
+#include "stdlib.h"
+
+#include "xtest.h"
+#include "Xlib.h"
+#include "Xutil.h"
+#include "tet_api.h"
+#include "xtestlib.h"
+#include "pixval.h"
+
+/*
+ * Create an input-only window on the given display
+ * The window has size 5x5 at location 1, 1.
+ */
+Window
+iponlywin(disp)
+Display *disp;
+{
+Window w;
+XSetWindowAttributes atts;
+
+ atts.override_redirect = config.debug_override_redirect;
+ w = XCreateWindow(disp
+ , DefaultRootWindow(disp)
+ , 1
+ , 1
+ , 5
+ , 5
+ , 0
+ , 0
+ , InputOnly
+ , (Visual *)CopyFromParent
+ , CWOverrideRedirect
+ , &atts
+ );
+ regid(disp, (union regtypes *)&w, REG_WINDOW);
+ return(w);
+}