x11: add nested x11 backend
This commit is contained in:
parent
2698c06f50
commit
74a4ed1058
7 changed files with 470 additions and 29 deletions
18
src/backend/mod.rs
Normal file
18
src/backend/mod.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::state::State;
|
||||
use anyhow::Result;
|
||||
use smithay::reexports::calloop::EventLoop;
|
||||
|
||||
pub mod x11;
|
||||
// TODO
|
||||
// pub mod wayland; // tbd in smithay
|
||||
// pub mod udev;
|
||||
|
||||
pub fn init_backend_auto(event_loop: &mut EventLoop<State>, state: &mut State) -> Result<()> {
|
||||
if std::env::var_os("DISPLAY").is_some() {
|
||||
x11::init_backend(event_loop, state)
|
||||
} else {
|
||||
unimplemented!("Currently this runs only nested")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue