A few more hacks for the wonderful mono implementation of winforms

This commit is contained in:
Magnus Norddahl 2020-09-15 00:41:53 +02:00
parent 90831bd630
commit 353c714efc

View file

@ -1242,8 +1242,11 @@ namespace CodeImp.DoomBuilder.Windows
"//////////////////////////////////////////////////////8=";
using (var stream = new MemoryStream(System.Convert.FromBase64String(emptycursor)))
{
Cursor.Current = new Cursor(stream);
var cursor = new Cursor(stream);
Cursor.Current = cursor;
display.Cursor = cursor;
}
Application.DoEvents();
#endif
}
}
@ -1261,10 +1264,12 @@ namespace CodeImp.DoomBuilder.Windows
// Release and show the mouse
Cursor.Clip = Rectangle.Empty;
Cursor.Position = display.PointToScreen(new Point(display.ClientSize.Width / 2, display.ClientSize.Height / 2));
Cursor.Show();
#if MONO_WINFORMS
Cursor.Current = Cursors.Default;
display.Cursor = Cursors.Default;
Application.DoEvents();
#endif
Cursor.Show();
}
}