1
0
Fork 0
forked from wry/wry

autocommit 2022-02-05 18:14:24 CET

This commit is contained in:
Julian Orth 2022-02-05 18:14:24 +01:00
parent 2d8b3a200e
commit 3a4ae99b9a
71 changed files with 1626 additions and 1306 deletions

View file

@ -3,7 +3,7 @@ use crate::backend::{BackendEvent, OutputId, OutputIds, SeatId, SeatIds};
use crate::client::{Client, Clients};
use crate::cursor::ServerCursors;
use crate::event_loop::EventLoop;
use crate::globals::{AddGlobal, Globals};
use crate::globals::{GlobalsError, Globals, WaylandGlobal};
use crate::ifs::wl_output::WlOutputGlobal;
use crate::ifs::wl_seat::WlSeatGlobal;
use crate::ifs::wl_surface::NoneSurfaceExt;
@ -61,13 +61,14 @@ impl State {
self.render_ctx.set(Some(ctx.clone()));
}
pub fn add_global<T>(&self, global: &Rc<T>)
where
Globals: AddGlobal<T>,
{
pub fn add_global<T: WaylandGlobal>(&self, global: &Rc<T>) {
self.globals.add_global(self, global)
}
pub fn remove_global<T: WaylandGlobal>(&self, global: &T) -> Result<(), GlobalsError> {
self.globals.remove(self, global)
}
pub fn tree_changed(&self) {
if self.tree_changed_sent.replace(true) {
return;