1
0
Fork 0
forked from wry/wry

config: generate graphics-initialized event in the frontend

This commit is contained in:
Julian Orth 2022-05-06 17:15:13 +02:00
parent c30f4d7266
commit 5e21e00059
17 changed files with 56 additions and 29 deletions

View file

@ -63,6 +63,7 @@ pub struct State {
pub el: Rc<EventLoop>,
pub render_ctx: CloneCell<Option<Rc<RenderContext>>>,
pub render_ctx_version: NumCell<u32>,
pub render_ctx_ever_initialized: Cell<bool>,
pub cursors: CloneCell<Option<Rc<ServerCursors>>>,
pub wheel: Rc<Wheel>,
pub clients: Clients,
@ -251,6 +252,12 @@ impl State {
for seat in seats.values() {
seat.render_ctx_changed();
}
if ctx.is_some() && !self.render_ctx_ever_initialized.replace(true) {
if let Some(config) = self.config.get() {
config.graphics_initialized();
}
}
}
pub fn add_global<T: WaylandGlobal>(&self, global: &Rc<T>) {