From 70769c9d7ec655d923cb2398edbdfcf28b8e4526 Mon Sep 17 00:00:00 2001 From: Josh Dersch Date: Thu, 8 Jun 2017 10:28:22 -0700 Subject: [PATCH] Updated workaround for mouse issue on OS X Sierra --- Contralto/SdlUI/SdlAltoWindow.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Contralto/SdlUI/SdlAltoWindow.cs b/Contralto/SdlUI/SdlAltoWindow.cs index 25ae93a..5bdceb1 100644 --- a/Contralto/SdlUI/SdlAltoWindow.cs +++ b/Contralto/SdlUI/SdlAltoWindow.cs @@ -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; }