-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PositionCursor
broke with recent ConsoleDriver changes
#3881
Comments
This is a brute force way to fix this problem in #3837 Each iteration after draw we ask the most focused view where it would like cursor to be. Thoughts? internal void IterationImpl ()
{
InputProcessor.ProcessQueue ();
if (Application.Top != null)
{
bool needsDrawOrLayout = AnySubviewsNeedDrawn (Application.Top);
bool sizeChanged = WindowSizeMonitor.Poll ();
if (needsDrawOrLayout || sizeChanged)
{
// TODO: Test only
Application.LayoutAndDraw (true);
Out.Write (OutputBuffer);
+ Application.Top.MostFocused?.PositionCursor ();
+ Out.SetCursorPosition (OutputBuffer.Col,OutputBuffer.Row);
+ Out.SetCursorVisibility (CursorVisibility.Default);
}
}
var swCallbacks = Stopwatch.StartNew ();
TimedEvents.LockAndRunTimers ();
TimedEvents.LockAndRunIdles ();
Logging.IterationInvokesAndTimeouts.Record (swCallbacks.Elapsed.Milliseconds);
} |
@BDisp are you able to look into what broke the current PositionCursor? I have some ideas about how we can improve it but having v2 fixed would be a good baseline place to start. I suspect it could be down to focus events changing and/or the keyboard/mouse handling code changes altering the order of execution of events? |
Seems it was working at 903a886 |
Hmn actually I am having difficulty reproducing this. I get invisible cursor sometimes on some consoles but that is seperate issue I think |
But its broken using Win or Net? |
UICatalog in @tig gif above is showing WindowsDriver but I cannot repro. |
I can't tell exactly what changed, but in the recent
IConsoleDriver
workPositionCursor
is not working correctly.The cursor is appearing all over the place when it shouldn't
The text was updated successfully, but these errors were encountered: