[Piglit] [PATCH] Using waffle, only prevent X11 windows from taking focus in automatic mode.

Brian Paul brianp at vmware.com
Wed Feb 6 08:25:32 PST 2013


On 02/06/2013 09:09 AM, Michel Dänzer wrote:
> On Mit, 2013-02-06 at 07:44 -0700, Brian Paul wrote:
>> On 02/06/2013 02:38 AM, Michel Dänzer wrote:
>>> From: Michel Dänzer<michel.daenzer at amd.com>
>>>
>>> Otherwise this prevents any interaction with the windows in non-automatic
>>> mode, not even the Escape key or the window decoration close button works.
>>> That's quite annoying for investigating test failures.
>>>
>>> Signed-off-by: Michel Dänzer<michel.daenzer at amd.com>
>>> ---
>>>    tests/util/piglit-framework-gl/piglit_x11_framework.c |   14 ++++++++------
>>>    1 file changed, 8 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/tests/util/piglit-framework-gl/piglit_x11_framework.c b/tests/util/piglit-framework-gl/piglit_x11_framework.c
>>> index ef7fbcf..dafd370 100644
>>> --- a/tests/util/piglit-framework-gl/piglit_x11_framework.c
>>> +++ b/tests/util/piglit-framework-gl/piglit_x11_framework.c
>>> @@ -170,12 +170,14 @@ show_window(struct piglit_winsys_framework *winsys_fw)
>>>
>>>    	get_native(x11_fw);
>>>
>>> -	/* Prevent the window from grabbing input. */
>>> -	wm_hints = XAllocWMHints();
>>> -	wm_hints->flags |= InputHint;
>>> -	wm_hints->input = False;
>>> -	XSetWMHints(x11_fw->display, x11_fw->window, wm_hints);
>>> -	XFree(wm_hints);
>>> +	if (piglit_automatic) {
>>> +		/* Prevent the window from grabbing input. */
>>> +		wm_hints = XAllocWMHints();
>>> +		wm_hints->flags |= InputHint;
>>> +		wm_hints->input = False;
>>> +		XSetWMHints(x11_fw->display, x11_fw->window, wm_hints);
>>> +		XFree(wm_hints);
>>> +	}
>>>
>>>    	waffle_window_show(wfl_fw->window);
>>>    }
>>
>> Reviewed-by: Brian Paul<brianp at vmware.com>
>
> Thanks.
>
>> Thank you!  I've been meaning to figure out what was going on with
>> this for a while.
>
> So did I. :)
>
>
> Can you push the attached for me? I added your R-b and credits for Chad.

Done.

-Brian



More information about the Piglit mailing list