wayland: add jay_render_ctx
This commit is contained in:
parent
b3c20c5309
commit
53ca7b5b2a
7 changed files with 137 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ use {
|
|||
globals::{Globals, GlobalsError, WaylandGlobal},
|
||||
ifs::{
|
||||
ext_session_lock_v1::ExtSessionLockV1,
|
||||
jay_render_ctx::JayRenderCtx,
|
||||
jay_seat_events::JaySeatEvents,
|
||||
wl_drm::WlDrmGlobal,
|
||||
wl_seat::{SeatIds, WlSeatGlobal},
|
||||
|
|
@ -42,7 +43,7 @@ use {
|
|||
queue::AsyncQueue, refcounted::RefCounted, run_toplevel::RunToplevel,
|
||||
},
|
||||
wheel::Wheel,
|
||||
wire::JaySeatEventsId,
|
||||
wire::{JayRenderCtxId, JaySeatEventsId},
|
||||
xkbcommon::{XkbContext, XkbKeymap},
|
||||
xwayland::{self, XWaylandEvent},
|
||||
},
|
||||
|
|
@ -117,6 +118,7 @@ pub struct State {
|
|||
pub cursor_sizes: RefCounted<u32>,
|
||||
pub hardware_tick_cursor: AsyncQueue<Option<Rc<dyn Cursor>>>,
|
||||
pub testers: RefCell<AHashMap<(ClientId, JaySeatEventsId), Rc<JaySeatEvents>>>,
|
||||
pub render_ctx_watchers: CopyHashMap<(ClientId, JayRenderCtxId), Rc<JayRenderCtx>>,
|
||||
}
|
||||
|
||||
// impl Drop for State {
|
||||
|
|
@ -320,6 +322,10 @@ impl State {
|
|||
config.graphics_initialized();
|
||||
}
|
||||
}
|
||||
|
||||
for watcher in self.render_ctx_watchers.lock().values() {
|
||||
watcher.send_render_ctx(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
fn reload_cursors(&self) {
|
||||
|
|
@ -577,6 +583,7 @@ impl State {
|
|||
self.pending_container_render_data.clear();
|
||||
self.pending_float_layout.clear();
|
||||
self.pending_float_titles.clear();
|
||||
self.render_ctx_watchers.clear();
|
||||
self.slow_clients.clear();
|
||||
for (_, h) in self.input_device_handlers.borrow_mut().drain() {
|
||||
h.async_event.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue