From 4e98c3494048934f12028a30f8cbadc7cc567d49 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Tue, 17 Oct 2017 14:08:30 +0300 Subject: [PATCH] [GTK3] Skip resize part of configure event if OverrideRedirect=true --- src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs b/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs index 3128be23aa..136023c31d 100644 --- a/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs +++ b/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs @@ -70,12 +70,15 @@ namespace Avalonia.Gtk3 private bool OnConfigured(IntPtr gtkwidget, IntPtr ev, IntPtr userdata) { int w, h; - Native.GtkWindowGetSize(GtkWidget, out w, out h); - var size = ClientSize = new Size(w, h); - if (_lastSize != size) + if (!OverrideRedirect) { - Resized?.Invoke(size); - _lastSize = size; + Native.GtkWindowGetSize(GtkWidget, out w, out h); + var size = ClientSize = new Size(w, h); + if (_lastSize != size) + { + Resized?.Invoke(size); + _lastSize = size; + } } var pos = Position; if (_lastPosition != pos)