From f22911fff356e63d2a99e96bae450b5744d87084 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 11 Apr 2020 10:01:00 +0300 Subject: [PATCH] [X11] Don't trigger Resized event on ConfigureEvent for popups Sometimes there is a race that disables auto-sizing 1) Resize(100, 100) 2) Resize(200,200) 3) ConfigureEvent(100, 100), Resized is triggered, WindowBase treats it as a user-triggered resize, everything gets broken --- src/Avalonia.X11/X11Window.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.X11/X11Window.cs b/src/Avalonia.X11/X11Window.cs index 60fd0346a3..c81a270145 100644 --- a/src/Avalonia.X11/X11Window.cs +++ b/src/Avalonia.X11/X11Window.cs @@ -442,7 +442,7 @@ namespace Avalonia.X11 updatedSizeViaScaling = UpdateScaling(); } - if (changedSize && !updatedSizeViaScaling) + if (changedSize && !updatedSizeViaScaling && !_popup) Resized?.Invoke(ClientSize); Dispatcher.UIThread.RunJobs(DispatcherPriority.Layout);