Restore logind as a default feature
This commit is contained in:
parent
b8c20ebf30
commit
1b5537d537
|
@ -43,7 +43,7 @@ slog-term = "2.3"
|
||||||
gl_generator = { version = "0.10", optional = true }
|
gl_generator = { version = "0.10", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["backend_winit", "backend_drm_legacy", "backend_drm_gbm", "backend_drm_egl", "backend_libinput", "backend_udev", "backend_session", "renderer_glium", "xwayland", "wayland_frontend"]
|
default = ["backend_winit", "backend_drm_legacy", "backend_drm_gbm", "backend_drm_egl", "backend_libinput", "backend_udev", "backend_session_logind", "renderer_glium", "xwayland", "wayland_frontend"]
|
||||||
backend_winit = ["winit", "wayland-server/dlopen", "wayland-client/dlopen", "backend_egl", "renderer_gl", "use_system_lib"]
|
backend_winit = ["winit", "wayland-server/dlopen", "wayland-client/dlopen", "backend_egl", "renderer_gl", "use_system_lib"]
|
||||||
backend_drm = ["drm"]
|
backend_drm = ["drm"]
|
||||||
backend_drm_legacy = ["backend_drm"]
|
backend_drm_legacy = ["backend_drm"]
|
||||||
|
|
|
@ -25,7 +25,7 @@ features = [ "renderer_glium", "backend_egl", "wayland_frontend" ]
|
||||||
gl_generator = "0.10"
|
gl_generator = "0.10"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = [ "winit", "egl", "udev" ]
|
default = [ "winit", "egl", "udev", "logind" ]
|
||||||
egl = [ "smithay/use_system_lib" ]
|
egl = [ "smithay/use_system_lib" ]
|
||||||
winit = [ "smithay/backend_winit" ]
|
winit = [ "smithay/backend_winit" ]
|
||||||
udev = [ "smithay/backend_libinput", "smithay/backend_drm_legacy", "smithay/backend_drm_gbm", "smithay/backend_drm_egl", "smithay/backend_udev", "smithay/backend_session" ]
|
udev = [ "smithay/backend_libinput", "smithay/backend_drm_legacy", "smithay/backend_drm_gbm", "smithay/backend_drm_egl", "smithay/backend_udev", "smithay/backend_session" ]
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
use std::{rc::Rc, cell::RefCell};
|
||||||
|
|
||||||
|
struct SignalerInner<E> {
|
||||||
|
closures: RefCell<Vec<Box<dyn FnMut(&mut E)>>>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<E> SignalerInner<E> {
|
||||||
|
fn new() -> SignalerInner<E> {
|
||||||
|
SignalerInner {
|
||||||
|
closures: RefCell::new(Vec::new())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Signaler<E> {
|
||||||
|
inner: Rc<SignalerInner<E>>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<E> Clone for Signaler<E> {
|
||||||
|
fn clone(&self) -> Signaler<E> {
|
||||||
|
Signaler {
|
||||||
|
inner: self.inner.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<E> Signaler<E> {
|
||||||
|
pub fn new() -> Signaler<E> {
|
||||||
|
Signaler {
|
||||||
|
inner: Rc::new(SignalerInner::new())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn register_closure<F: FnMut(&mut E) + 'static>(&self, f: F) {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn send_event(&self, event: &mut E) {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue