From 5e0a08d3e459878e0382bc0c8657bcdbc6bfa3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 19 Dec 2016 12:42:06 +0200 Subject: [PATCH] tcuX11: fix to wait for matching ConfigureNotify Patch changes loop in setDimensions to spin until exact matching ConfigureNotify event was caught. This makes sure that we don't catch something that was in the event queue earlier and conclude that as event triggered by our resize. --- framework/platform/X11/tcuX11.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/platform/X11/tcuX11.cpp b/framework/platform/X11/tcuX11.cpp index ee24d13..00c2171 100644 --- a/framework/platform/X11/tcuX11.cpp +++ b/framework/platform/X11/tcuX11.cpp @@ -244,8 +244,11 @@ void XlibWindow::setDimensions (int width, int height) for(;;) { XNextEvent(dpy, &myevent); - if (myevent.type == ConfigureNotify) - break; + if (myevent.type == ConfigureNotify) { + XConfigureEvent e = myevent.xconfigure; + if (e.width == width && e.height == height) + break; + } } } -- 2.7.4