[Piglit] [PATCH] util/x11: Propagate window resize events to piglit_width/height

Chad Versace chad.versace at linux.intel.com
Sat Oct 19 03:41:07 CEST 2013


On 10/18/2013 05:19 PM, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
>
>> When I switched Piglit from GLUT to Waffle, I broke detection of X11
>> window resizes. When the user resized the window, Piglit called
>> piglit_display() but neglected to update piglit_width/height.
>>
>> This patch ensures that Piglit updates piglit_width/height correctly.
>>
>> (It's amazing that it took this long for anyone to fix it. People must
>> rarely resize Piglit windows).
>
> ConfigureNotify tells you the new size.  And I'm not clear why you'd
> need to update the size at Expose time.

I admit that I don't understand X protocol. I knew that ConfigureNotify
tells us the size, and I was unsure if Expose did also. So I played it
safe and updated the size on both events.

So, the size update on Event needs to get removed.

Is there a cleaner way to get the window size from the ConfigureNotify
event than calling XGetGeometry?



More information about the Piglit mailing list