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

Refine event handling #4

Closed
jserv opened this issue Jul 17, 2024 · 1 comment
Closed

Refine event handling #4

jserv opened this issue Jul 17, 2024 · 1 comment
Assignees

Comments

@jserv
Copy link
Contributor

jserv commented Jul 17, 2024

The internal event handling relied on the poll(2) for monitoring X11 events via I/O multiplexing. However, for backends such as SDL, this manipulation causes problems since the internal file descriptors associated with underlying system events are hidden and not exposed. Thus, we should avoid polling the file descriptors. Instead, let the backend handle the event loop when possible. See commit e935b0d .

For #3, we may provide poll(2) based mechanism to monitor events when requested.

@shengwen-tw
Copy link
Collaborator

Reference for implementing Coroutine in C:
https://github.com/shengwen-tw/coroutine_c

alanjian85 added a commit to alanjian85/mado that referenced this issue Oct 31, 2024
This commit adds a member function for event handling to the backend
interface, replacing the previous file-based system that relies on
poll(2). The new design addresses issues created by backends like SDL,
which do not expose underlying file descriptors. Integrating the fbdev
backend into the updated interface remains to be completed.

Close sysprog21#4
alanjian85 added a commit to alanjian85/mado that referenced this issue Oct 31, 2024
This commit adds a member function for event handling to the backend
interface, replacing the previous file-based system that relies on
poll(2). The new design addresses issues created by backends like SDL,
which do not expose underlying file descriptors. Integrating the fbdev
backend into the updated interface remains to be completed.

Close sysprog21#4
alanjian85 added a commit to alanjian85/mado that referenced this issue Oct 31, 2024
This commit adds a member function for event handling to the backend
interface, replacing the previous file-based system that relies on
poll(2). The new design addresses issues created by backends like SDL,
which do not expose underlying file descriptors. Integrating the fbdev
backend into the updated interface remains to be completed.

Close sysprog21#4
alanjian85 added a commit to alanjian85/mado that referenced this issue Nov 19, 2024
This commit adds a member function for event handling to the backend
interface, replacing the previous file-based system that relies on
poll(2). The new design addresses issues created by backends like SDL,
which do not expose underlying file descriptors. Integrating the fbdev
backend into the updated interface remains to be completed.

Close sysprog21#4
@jserv jserv closed this as completed in 5fafbd2 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants