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

Fix core.redraw when window is not focused #1601

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

Guldoman
Copy link
Member

Fixes #1466.

Now when the window loses focus, core.step is executed at least once, to check if anything sets core.redraw.

A similar thing is done to run_threads, which are now executed fully at least once.

This way if `core.redraw` is set, it's respected.
This allows threads that set `core.redraw` (like `projectsearch`) to 
continue running even after the window loses focus.

"Fully" here means that `run_threads` has gone through *all* the "timed 
out" coroutines at least once.
@adamharrison
Copy link
Member

Tested, looks good.

@adamharrison adamharrison merged commit ee93c3b into lite-xl:master Nov 29, 2023
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Nov 30, 2023
* Execute at least one step when window has no focus

This way if `core.redraw` is set, it's respected.

* Fully run threads at least once when window has no focus

This allows threads that set `core.redraw` (like `projectsearch`) to
continue running even after the window loses focus.

"Fully" here means that `run_threads` has gone through *all* the "timed
out" coroutines at least once.
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Nov 30, 2023
* Execute at least one step when window has no focus

This way if `core.redraw` is set, it's respected.

* Fully run threads at least once when window has no focus

This allows threads that set `core.redraw` (like `projectsearch`) to
continue running even after the window loses focus.

"Fully" here means that `run_threads` has gone through *all* the "timed
out" coroutines at least once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

core.redraw isn't fully respected when the window is not in focus
2 participants