[Piglit] piglit window

Luca Barbieri luca.barbieri at gmail.com
Sun Aug 22 10:03:07 PDT 2010

I managed to solve the issue of preventing the annoying piglit popups
with an LD_PRELOAD library.

The solution is to hook XMapWindow and friends to do this instead:
1. Set _NET_WM_USER_TIME to 0: this prevents the popup
2. Set _NET_WM_STATE_SKIP_TASKBAR in _NET_WM_STATE: this prevents it
showing up in the taskbar
3. Map the window
4. Send the window a fake VisibilityNotify event with Unobscured
5. Send the window a fake Expose event

Also, I use XESetWireToEvent to patch any VisibilityNotify events from
the server to have state Unobscured.

GLUT will only call the display function if it saw an Expose, saw a
VisibilityNotify and the last VisibilityNotify seen was not with
FullyObscured state.

This makes it work for all tests, except for an handful of tests (such
as read-front, trinity-fp1, texrect-many) which fail in this mode
(read-front is expected, the others not sure why).

I can send my LD_PRELOAD library if desired, or alternatively
equivalent changes can be applied to piglit/glean/GLUT itself.

More information about the Piglit mailing list