From fe65c87d810fc88826ec93914fd5b9062d7940e2 Mon Sep 17 00:00:00 2001 From: copygirl Date: Mon, 1 Jan 2018 21:20:17 +0100 Subject: [PATCH] Replace cursor_visible with implementation INativeWindow implementations already have their own private fields storing cursor visibility --- src/OpenTK/NativeWindow.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OpenTK/NativeWindow.cs b/src/OpenTK/NativeWindow.cs index 39f2c62a..3ef08d01 100644 --- a/src/OpenTK/NativeWindow.cs +++ b/src/OpenTK/NativeWindow.cs @@ -47,7 +47,6 @@ namespace OpenTK private readonly INativeWindow implementation; private bool events; - private bool cursor_visible = true; private bool previous_cursor_visible = true; /// @@ -476,10 +475,10 @@ namespace OpenTK /// public bool CursorVisible { - get { return cursor_visible; } + get { return implementation.CursorVisible; } set { - cursor_visible = value; + if (value == implementation.CursorVisible) return; implementation.CursorVisible = value; } }