|
From: Carl W. <cw...@cw...> - 2010-07-23 16:17:39
|
This allows the user to continue to type at other windows while glean tests are running. --- 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 f158921..2a3bea1 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; -- 1.7.1.249.g74df7 |