diff options
author | Carl Worth <cworth@cworth.org> | 2011-03-25 14:02:53 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-05-10 12:13:54 +0100 |
commit | 7a19dec70802f841f5ce3c9821f086cde1130132 (patch) | |
tree | 64879bae9f14aa3b67b4105e9b6622d3caa6dc52 | |
parent | db70322494a8dc9aa3264e080f0283091d870e43 (diff) |
This allows the user to continue to type at other windows while glean
tests are running.
-rw-r--r-- | src/glean/dsurf.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glean/dsurf.cpp b/src/glean/dsurf.cpp index 8aa1e67..3683db1 100644 --- a/src/glean/dsurf.cpp +++ b/src/glean/dsurf.cpp @@ -87,6 +87,7 @@ legacyMethod: // Create the window: XSetWindowAttributes xswa; + XWMHints *wmHints; xswa.background_pixmap = None; xswa.border_pixel = 0; xswa.colormap = ChooseColormap(winSys->dpy, config->vi); @@ -111,6 +112,15 @@ legacyMethod: XSetStandardProperties(winSys->dpy, xWindow, "glean", "glean", None, 0, 0, &sizeHints); + // Try to prevent test window from stealing focus + wmHints = XAllocWMHints(); + wmHints->flags |= InputHint; + wmHints->input = False; + + XSetWMHints(winSys->dpy, xWindow, wmHints); + + XFree(wmHints); + // Map the window and wait for it to appear: XMapWindow(winSys->dpy, xWindow); XEvent event; |