From d1c93a99561d054fdf7ec5c676706a4ca28d2868 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 4 Dec 2015 19:34:51 -0500 Subject: [PATCH] Made relayouts on Windows faster by preventing an accidental requeue of a window that's being processed in the event that a layout change changes the minimum size (such as switching tabs). --- windows/resize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/resize.c b/windows/resize.c index 59c10c48..abb84647 100644 --- a/windows/resize.c +++ b/windows/resize.c @@ -43,9 +43,10 @@ void doResizes(void) while (resizes->len != 0) { w = ptrArrayIndex(resizes, uiWindowsControl *, 0); - ptrArrayDelete(resizes, 0); // don't clip content if content dynamically changed (tab page changed, etc.) + // do this BEFORE removing w from the queue list to avoid double queueing ensureMinimumWindowSize(uiWindow(w)); + ptrArrayDelete(resizes, 0); hwnd = (HWND) uiControlHandle(uiControl(w)); if (GetClientRect(hwnd, &r) == 0) logLastError("error getting uiWindow client rect in doResizes()");