diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1c0027f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# use tabs by default for everything +[*.cs] +indent_style = tab +indent_size = 4 +tab_size = 4 +charset=utf-8 +csharp_new_line_before_open_brace = all + +[*.{csproj,vbproj,proj,targets,props}] +indent_style = space +indent_size = 2 +tab_size = 2 diff --git a/Eto.OpenTK.Mac/MacGLSurfaceHandler.cs b/Eto.OpenTK.Mac/MacGLSurfaceHandler.cs index 5e8d9ab..535a65e 100644 --- a/Eto.OpenTK.Mac/MacGLSurfaceHandler.cs +++ b/Eto.OpenTK.Mac/MacGLSurfaceHandler.cs @@ -18,14 +18,14 @@ namespace Eto.OpenTK.Mac { - public class MacGLSurfaceHandler : MacView, GLSurface.IHandler + public class MacGLSurfaceHandler : MacView, GLSurface.IHandler { static MacGLSurfaceHandler() { Toolkit.Init(new ToolkitOptions { Backend = PlatformBackend.PreferNative // prevent SDL2 from being detected if it is installed. - }); + }); } protected override void Initialize() @@ -77,7 +77,7 @@ public override void Invalidate(bool invalidateChildren) public override void Invalidate(Rectangle rect, bool invalidateChildren) { - Control.NeedsNewContext = true; + Control.NeedsNewContext = true; base.Invalidate(rect, invalidateChildren); var needsDisplayInRect = rect.ToNS(); if (!Control.IsFlipped) @@ -101,7 +101,11 @@ public override void AttachEvent(string id) break; case Eto.Forms.Control.SizeChangedEvent: - Control.SizeChanged += (sender, e) => Callback.OnSizeChanged(Widget, EventArgs.Empty); + Control.SizeChanged += (sender, e) => + { + OnSizeChanged(EventArgs.Empty); + Callback.OnSizeChanged(Widget, EventArgs.Empty); + }; break; default: