Replace cursor_visible with implementation

INativeWindow implementations already have their own private fields storing cursor visibility
This commit is contained in:
copygirl 2018-01-01 21:20:17 +01:00
parent f28ea173dc
commit fe65c87d81

View file

@ -47,7 +47,6 @@ namespace OpenTK
private readonly INativeWindow implementation; private readonly INativeWindow implementation;
private bool events; private bool events;
private bool cursor_visible = true;
private bool previous_cursor_visible = true; private bool previous_cursor_visible = true;
/// <summary> /// <summary>
@ -476,10 +475,10 @@ namespace OpenTK
/// </summary> /// </summary>
public bool CursorVisible public bool CursorVisible
{ {
get { return cursor_visible; } get { return implementation.CursorVisible; }
set set
{ {
cursor_visible = value; if (value == implementation.CursorVisible) return;
implementation.CursorVisible = value; implementation.CursorVisible = value;
} }
} }