feat(ui): refine Graphite visuals and center navigation content
This commit is contained in:
1 parent
cc3b6f903f
commit
1e34ec47ad
14 files changed
+646
-121
No files matched your search
@@ -107,6 +107,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
let mut sequences: Vec<Vec<u32>> = Vec::new();
|
||||
let mut clicks = Vec::new();
|
||||
let mut hovers = Vec::new();
|
||||
let mut drag = None;
|
||||
let mut extent = (1280, 800);
|
||||
let mut args = std::env::args().skip(1);
|
||||
@@ -119,6 +120,13 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
extent = (v[0], v[1]);
|
||||
}
|
||||
"--hover" => {
|
||||
let v = parse_numbers(&args.next().ok_or("missing hover position")?)?;
|
||||
if v.len() != 2 {
|
||||
return Err("invalid hover".into());
|
||||
}
|
||||
hovers.push((v[0], v[1]));
|
||||
}
|
||||
"--click" => {
|
||||
let v = parse_numbers(&args.next().ok_or("missing click position")?)?;
|
||||
if v.len() != 2 {
|
||||
@@ -247,12 +255,24 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
std::thread::sleep(Duration::from_millis(35));
|
||||
}
|
||||
}
|
||||
if !clicks.is_empty() || drag.is_some() {
|
||||
if !clicks.is_empty() || !hovers.is_empty() || drag.is_some() {
|
||||
let pointer = state
|
||||
.pointer_manager
|
||||
.as_ref()
|
||||
.ok_or("test pointer is not enabled on this compositor")?
|
||||
.create_virtual_pointer(state.seat.as_ref(), &qh, ());
|
||||
for (x, y) in hovers {
|
||||
pointer.motion_absolute(
|
||||
started.elapsed().as_millis() as u32,
|
||||
x,
|
||||
y,
|
||||
extent.0,
|
||||
extent.1,
|
||||
);
|
||||
pointer.frame();
|
||||
queue.roundtrip(&mut state)?;
|
||||
std::thread::sleep(Duration::from_millis(120));
|
||||
}
|
||||
for (x, y) in clicks {
|
||||
pointer.motion_absolute(
|
||||
started.elapsed().as_millis() as u32,
|
||||
|
||||
Reference in new issue
Block a user