Browse Source

[GTK3] Skip resize part of configure event if OverrideRedirect=true

pull/1231/head
Nikita Tsukanov 9 years ago
parent
commit
4e98c34940
  1. 13
      src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs

13
src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs

@ -70,12 +70,15 @@ namespace Avalonia.Gtk3
private bool OnConfigured(IntPtr gtkwidget, IntPtr ev, IntPtr userdata) private bool OnConfigured(IntPtr gtkwidget, IntPtr ev, IntPtr userdata)
{ {
int w, h; int w, h;
Native.GtkWindowGetSize(GtkWidget, out w, out h); if (!OverrideRedirect)
var size = ClientSize = new Size(w, h);
if (_lastSize != size)
{ {
Resized?.Invoke(size); Native.GtkWindowGetSize(GtkWidget, out w, out h);
_lastSize = size; var size = ClientSize = new Size(w, h);
if (_lastSize != size)
{
Resized?.Invoke(size);
_lastSize = size;
}
} }
var pos = Position; var pos = Position;
if (_lastPosition != pos) if (_lastPosition != pos)

Loading…
Cancel
Save