diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index 8fb1d52e8c..c0034d6c2f 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -1811,12 +1811,6 @@ private async Task ProcessContinuousButtonPressedAsync (MouseFlags mouseFlag) int delay = startDelay; while (_isButtonPressed) { - var me = new MouseEvent - { - Position = _pointMove, - Flags = mouseFlag - }; - // TODO: This makes ConsoleDriver dependent on Application, which is not ideal. This should be moved to Application. View view = Application.WantContinuousButtonPressedView; @@ -1831,6 +1825,12 @@ private async Task ProcessContinuousButtonPressedAsync (MouseFlags mouseFlag) } await Task.Delay (delay); + var me = new MouseEvent + { + Position = _pointMove, + Flags = mouseFlag + }; + //Debug.WriteLine($"ProcessContinuousButtonPressedAsync: {view}"); if (_isButtonPressed && (mouseFlag & MouseFlags.ReportMousePosition) == 0) {