1
0
mirror of https://github.com/livingcomputermuseum/ContrAlto.git synced 2026-01-23 02:47:48 +00:00

Updated workaround for mouse issue on OS X Sierra

This commit is contained in:
Josh Dersch 2017-06-08 10:28:22 -07:00
parent 6cadb08b0e
commit 70769c9d7e

View File

@ -364,10 +364,12 @@ namespace Contralto.SdlUI
private void MouseDown(byte button, int x, int y)
{
//
// OS X issue: we get mousedown events when the window title
// is clicked, sometimes. So ignore those.
// OS X Sierra issue: we get mousedown events when the window title
// is clicked, sometimes. These always show up with a Y coordinate
// of zero. So ignore those only for mouse-capture purposes as
// a workaround.
//
if (x < 0 || y < 0)
if (!_mouseCaptured && (x <= 0 || y <= 0))
{
return;
}