custom runner using Xephyr

This commit is contained in:
Janis 2021-11-28 20:54:38 +01:00
parent 91b5c91bd5
commit 2e589bf94b
5 changed files with 22 additions and 1 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@
/Cargo.lock
/.cargo/
/wmlog
/xinitrc.tmp

12
runner.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# binary supplied by cargo
bin=$1
# write temporary xinitrc
printf "exec $bin\n" > xinitrc.tmp
# call xinit
XEPHYR_BIN=$(which Xephyr)
[ -z "$XEPHYR_BIN" ] || exec xinit ./xinitrc.tmp -- $XEPHYR_BIN :100 -ac -screen 800x600

View file

@ -38,6 +38,8 @@ pub trait WindowServerBackend {
fn ungrab_cursor(&self);
fn move_cursor(&self, window: Option<Self::Window>, position: Point<i32>);
fn all_windows(&self) -> Vec<Self::Window>;
fn resize_window(&self, window: Self::Window, new_size: Point<i32>) {
self.configure_window(window, Some(new_size), None, None);
}

View file

@ -857,6 +857,10 @@ impl WindowServerBackend for XLib {
);
}
}
fn all_windows(&self) -> Vec<Self::Window> {
todo!()
}
}
struct XLibAtoms {

View file

@ -537,7 +537,9 @@ impl ClientState {
{
let (new, old) = self.focus_client_inner(key);
if !(new.is_vacant() && old.is_vacant()) {
info!("Swapping focus: new({:?}) old({:?})", new, old);
}
(new, old)
}