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
{{ message }}
Repository navigation
egui_winit::State::new should not depend on &EventLoopWindowTarget just for wayland clipboard init #2912
I cannot construct a egui_winit::State at all on egui HEAD, as of #2765.
I use egui in an actor model system I built that allows me to treat winit windows as actors. This works is great, it allows me to create and use multiple windows, and multiple instances of a single window type. I can also control these windows from any thread in my app. To make this work, I can't pass the EventLoopWindowTarget into an actor's window constructor, because my winit user_event references the message types for all of the actor types. No actor's constructor actually knows the concrete type of the EventLoopWindowTarget UserEvent, because I don't have a circular type dependency from each actor impl -> all actor definitions (I don't know if that's even possible).
I'm currently constructing egui_winit::State myself, without access to an EventLoopWindowTarget. I use my own ActorWindowTarget type, which implements HasRawDisplayHandle.
I also don't use egui_winit's clipboard support at all (I have my own clipboard backend that is constructed and managed entirely outside of the egui state).
I think a good solution is to switch from requiring an EventLoopWindowTarget handle, to just impl HasRawDisplayHandle (which is implemented by EventLoopWindowTarget), if all you're looking for is a wayland display handle.
Activity
bu5hm4nn commentedon Jan 5, 2024
I believe this can be closed with the merge of #2914