Browse Source

Fixes

pull/875/head
Nikita Tsukanov 9 years ago
parent
commit
a649d176a3
  1. 5
      src/Gtk/Avalonia.Gtk3/PopupImpl.cs
  2. 2
      src/Gtk/Avalonia.Gtk3/TopLevelImpl.cs

5
src/Gtk/Avalonia.Gtk3/PopupImpl.cs

@ -32,9 +32,10 @@ namespace Avalonia.Gtk3
_desiredSize = value; _desiredSize = value;
if (GtkWidget.IsClosed) if (GtkWidget.IsClosed)
return; return;
if (base.ClientSize == value)
return;
Native.GtkWindowResize(GtkWidget, (int) value.Width, (int) value.Height); Native.GtkWindowResize(GtkWidget, (int) value.Width, (int) value.Height);
if (Native.GtkWidgetGetWindow(GtkWidget) == IntPtr.Zero)
Native.GtkWidgetRealize(GtkWidget);
Native.GdkWindowResize(Native.GtkWidgetGetWindow(GtkWidget), (int) value.Width, (int) value.Height);
} }
} }
} }

2
src/Gtk/Avalonia.Gtk3/TopLevelImpl.cs

@ -267,6 +267,8 @@ namespace Avalonia.Gtk3
public void SetCursor(IPlatformHandle cursor) public void SetCursor(IPlatformHandle cursor)
{ {
if (GtkWidget.IsClosed)
return;
Native.GdkWindowSetCursor(Native.GtkWidgetGetWindow(GtkWidget), cursor?.Handle ?? IntPtr.Zero); Native.GdkWindowSetCursor(Native.GtkWidgetGetWindow(GtkWidget), cursor?.Handle ?? IntPtr.Zero);
} }

Loading…
Cancel
Save