Skip to content

Commit

Permalink
remove unused warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Dec 17, 2023
1 parent 19143b9 commit 02d1b33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backend/consumer/x11.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use async_trait::async_trait;
use std::ptr;
use x11::{xlib::{self, XKeysymToKeycode, XCloseDisplay}, xtest};
use x11::{xlib::{self, XCloseDisplay}, xtest};

use crate::{client::ClientHandle, consumer::EventConsumer, event::{Event, PointerEvent, BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_FORWARD, BTN_BACK, KeyboardEvent}};

Expand Down Expand Up @@ -58,7 +58,10 @@ impl X11Consumer {
}
}

#[allow(dead_code)]
fn emulate_key(&self, key: u32, state: u8) {
let _ = key;
let _ = state;
unsafe {
xtest::XTestFakeKeyEvent(self.display, key, state as i32, 0);
}
Expand Down Expand Up @@ -100,6 +103,8 @@ impl EventConsumer for X11Consumer {
PointerEvent::Frame {} => {}
},
Event::Keyboard(KeyboardEvent::Key { time: _, key, state }) => {
let _ = key;
let _ = state;
// self.emulate_key(key, state);
}
_ => {}
Expand Down

0 comments on commit 02d1b33

Please sign in to comment.