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

Call update after running commands in the idle handler. #1062

Merged
merged 3 commits into from
Jun 28, 2020
Merged

Call update after running commands in the idle handler. #1062

merged 3 commits into from
Jun 28, 2020

Conversation

jneem
Copy link
Collaborator

@jneem jneem commented Jun 25, 2020

I'm not too sure about the invalidate_and_finalize, but at the very least I can't see why it would make sense for commands but not for ext events.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do_update calls invalidate_and_finalize. This does have me confused, though.

Thinking this through: most of the time, a command is issued during another event, and so invalidate_and_finalize is going to get called at the end of the parent event.

In certain situations (such as when a command is submitted during layout, in which case we've already called update) the command is queued, and then we schedule an idle task to run the command after paint returns.

Now: is there some reason not to update in this case? I can't think of one.

In this case I think the patch we want, here, is one that just replaces invalidate_and_finalize with do_update when handling RUN_COMMANDS_TOKEN.

@cmyr cmyr added the S-waiting-on-author waits for changes from the submitter label Jun 26, 2020
@jneem jneem requested a review from cmyr June 27, 2020 23:39
@jneem jneem added S-needs-review waits for review and removed S-waiting-on-author waits for changes from the submitter labels Jun 27, 2020
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@jneem jneem merged commit 9ab08b8 into linebender:master Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-review waits for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants