Move cursor visible check into implementations

This commit is contained in:
copygirl 2018-01-02 01:30:35 +01:00
parent fe65c87d81
commit 673c922b72
4 changed files with 4 additions and 5 deletions

View file

@ -476,11 +476,7 @@ namespace OpenTK
public bool CursorVisible
{
get { return implementation.CursorVisible; }
set
{
if (value == implementation.CursorVisible) return;
implementation.CursorVisible = value;
}
set { implementation.CursorVisible = value; }
}
/// <summary>

View file

@ -508,6 +508,7 @@ namespace OpenTK.Platform.Linux
}
set
{
if (value == is_cursor_visible) return;
if (value && !is_cursor_visible)
{
SetCursor(cursor_current);

View file

@ -1239,6 +1239,7 @@ namespace OpenTK.Platform.MacOS
get { return cursorVisible; }
set
{
if (value == cursorVisible) return;
if (value && !cursorVisible)
{
SetCursorVisible(true);

View file

@ -933,6 +933,7 @@ namespace OpenTK.Platform.SDL2
}
set
{
if (value == is_cursor_visible) return;
lock (sync)
{
if (Exists)