Skip to content

Commit

Permalink
Fixes gui-cs#3729. ProcessContinuousButtonPressedAsync is using a sta…
Browse files Browse the repository at this point in the history
…le MouseEvent. (gui-cs#3730)
  • Loading branch information
BDisp authored Sep 5, 2024
1 parent deadd5b commit 40056a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
{
Expand Down

0 comments on commit 40056a6

Please sign in to comment.