You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In at least version 0.9.0 there is no easy method to simply check if a given event is supposed to be handled by a window without first matching the event and extracting it from there. I propose adding a function on the x11rb::protocol::Event enum to ease this process that would look similar to
Puh, that's a complicated request. The existing XML from xcb-proto does not provide that kind of information, so someone would have to go through all X11 extensions and figure out which events have a relevant window field...
A quick (over-)estimate indicates this is a big job: (But the following also contains replies and requests and I guess most window fields are in those).
Would this really save much code in library users? Personally, I would code event handling as first matching on the specific event and inside the per-event code would I then look up some window if I need it. This approach also would save a bit of work: Events which are ignored will not cause the right window state to be looked up.
This could work, possibly. There’s a specific field in every event (can’t remember it off of the top of my head) that is reserved for the "target" resource, and this is always at the same index in every event.
In at least version 0.9.0 there is no easy method to simply check if a given event is supposed to be handled by a window without first matching the event and extracting it from there. I propose adding a function on the
x11rb::protocol::Event
enum to ease this process that would look similar toreturning
Option
since not all events are specific to a window.The text was updated successfully, but these errors were encountered: