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

Draft: Event stream IPC #453

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Draft: Event stream IPC #453

wants to merge 2 commits into from

Conversation

YaLTeR
Copy link
Owner

@YaLTeR YaLTeR commented Jun 20, 2024

Some basic scaffolding for an event stream IPC.

  1. Changed the client to read only a single line worth of response.

    This mirrors how the server works, and will be necessary to tell apart further messages. Events will arrive at one per line.

  2. Added Request::EventStream that replies with Response::Handled and then proceeds to write one Event per line as they occur.

  3. Events will be designed in such a way that the initial burst will synchronize the current state to the client, then subsequent events will modify that state in a consistent way. E.g. the initial burst of events will create all current outputs and workspaces.

  4. Compositor-side, event stream clients have a buffer of events for sending. If this buffer runs too large (the client hanged and isn't reading), this client will be dropped. This is kinda similar to what Wayland itself does.

The events are all subject to change until this PR is merged. Currently only the WindowFocused is actually implemented, and I'm planning to change its type too.

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

Successfully merging this pull request may close these issues.

None yet

1 participant