Skip to content

Commit d5abc20

Browse files
authored
Merge pull request #2266 from AaronLieberman/unix-idle-fix
Fixes #2265 - Keyboard input doesn't work in UnixMainLoop when Idle function is registered
2 parents 0d183c2 + d4f4fc6 commit d5abc20

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,15 @@ bool IMainLoopDriver.EventsPending (bool wait)
181181
{
182182
UpdatePollMap ();
183183

184-
if (CheckTimers (wait, out var pollTimeout)) {
185-
return true;
186-
}
184+
bool checkTimersResult = CheckTimers (wait, out var pollTimeout);
187185

188186
var n = poll (pollmap, (uint)pollmap.Length, pollTimeout);
189187

190188
if (n == KEY_RESIZE) {
191189
winChanged = true;
192190
}
193-
return n >= KEY_RESIZE || CheckTimers (wait, out pollTimeout);
191+
192+
return checkTimersResult || n >= KEY_RESIZE;
194193
}
195194

196195
bool CheckTimers (bool wait, out int pollTimeout)

0 commit comments

Comments
 (0)