Skip to content
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

Cursor disappears after exiting View mode through a "foreign key" #10

Open
countvajhula opened this issue Oct 27, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@countvajhula
Copy link
Owner

countvajhula commented Oct 27, 2021

Workaround: Enter view mode again and exit it by hitting Enter or Escape.

Description: View mode is a hydra-backed mode. Hydra supports many different ways of exiting, one of which is exiting via a "foreign key," that is, the hydra can be configured to exit when a key not explicitly handled by the hydra/mode is pressed. This behavior is desirable for modes like View mode, where we typically use it in a transitory way, and would like it to disappear when we start doing the thing we really want to do.

Rigpa, as a modal interface framework, is interested whenever a mode is entered and exited, no matter which modal interface provider is being used. We would like to take certain actions upon mode entry and exit, for which we need to formally tie into mode lifecycle hooks. Rigpa relies on the chimera abstraction layer to make the determination that a mode has exited. As there does not seem to be a post-exit hook in hydra, Chimera relies on the after-exit hook to detect this event, which treats a semaphore in the post hook being set as indicating that the mode has truly exited. This is a roundabout way to do it, but was necessary without a true post-exit hook being present. Unfortunately, exiting a hydra through a "foreign key" does not call the after-exit hook. So if View mode is exited without explicitly hitting Enter or Escape, the cursor does not reappear (it is hidden upon View mode entry).

That said, this bug is recent and this did not happen before. I think it was probably introduced in e51b14b.

Fix: Either (a) request a true post-exit hook from hydra itself, (b) or write a minimal modal interface provider that exposes lifecycle hooks, or (c) revert to the old way of handling hooks in Rigpa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant