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

Should processEvents() call R_ProcessEvents() on all platforms? #14698

Open
kevinushey opened this issue May 13, 2024 · 0 comments
Open

Should processEvents() call R_ProcessEvents() on all platforms? #14698

kevinushey opened this issue May 13, 2024 · 0 comments
Labels
tech debt internal tech debt with no direct benefit to customer.

Comments

@kevinushey
Copy link
Contributor

On non-Apple Unix platforms, we check and call input handlers, but we don't ever actually invoke R_ProcessEvents():

void processEvents()
{
#ifdef __APPLE__
R_ProcessEvents();
// pickup X11 graphics device events (if any) via X11 input handler
fd_set* what = R_checkActivity(0,1);
if (what != nullptr)
R_runHandlers(R_InputHandlers, what);
#else
// check for activity on standard input handlers (but ignore stdin).
// return immediately if there is no input currently available
fd_set* what = R_checkActivity(0,1);
// run handlers on the input (or run the polled event handler if there
// is no input currently available)
R_runHandlers(R_InputHandlers, what);
#endif
}

In practice, it seems like this isn't an issue because R_ProcessEvents() calls the function pointer ptr_R_ProcessEvents, which only gets set on macOS for the Quartz device. However, conceptually we likely should be calling R_ProcessEvents() regardless.

@kevinushey kevinushey added the tech debt internal tech debt with no direct benefit to customer. label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt internal tech debt with no direct benefit to customer.
Projects
None yet
Development

No branches or pull requests

1 participant