Browse Source

Fixed bug that created new instance of ScreenImpl every time it was accessed through WindowBaseImpl

pull/1159/head
Jurjen Biewenga 9 years ago
parent
commit
b44fde9613
  1. 5
      src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs
  2. 5
      src/OSX/Avalonia.MonoMac/WindowBaseImpl.cs
  3. 6
      src/Windows/Avalonia.Win32/WindowImpl.cs

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

@ -342,7 +342,10 @@ namespace Avalonia.Gtk3
Native.GtkWindowResize(GtkWidget, (int)value.Width, (int)value.Height);
}
public IScreenImpl Screen { get; } = new ScreenImpl();
public IScreenImpl Screen
{
get;
} = new ScreenImpl();
public Point Position
{

5
src/OSX/Avalonia.MonoMac/WindowBaseImpl.cs

@ -153,7 +153,10 @@ namespace Avalonia.MonoMac
Position = pos;
}
public IScreenImpl Screen { get; } = new ScreenImpl();
public IScreenImpl Screen
{
get;
} = new ScreenImpl();
public override Point PointToClient(Point point)
{

6
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -103,7 +103,11 @@ namespace Avalonia.Win32
}
}
public IScreenImpl Screen => new ScreenImpl();
public IScreenImpl Screen
{
get;
} = new ScreenImpl();
public IRenderer CreateRenderer(IRenderRoot root)
{

Loading…
Cancel
Save