mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 20:09:59 +03:00
not sure why I don't get any frame events ...
This commit is contained in:
@@ -4,6 +4,6 @@ ip = "192.168.2.182"
|
||||
port = 42069
|
||||
|
||||
[client.right]
|
||||
host_name = "Osmium"
|
||||
host_name = "rubinium"
|
||||
ip = "192.168.2.182"
|
||||
port = 42069
|
||||
|
||||
@@ -41,7 +41,6 @@ impl Dispatch<wl_registry::WlRegistry, ()> for App {
|
||||
name, interface, ..
|
||||
} = event
|
||||
{
|
||||
// println!("[{}] {} (v{})", name, interface, version);
|
||||
match &interface[..] {
|
||||
"wl_keyboard" => {
|
||||
registry.bind::<wl_keyboard::WlKeyboard, _, _>(name, 1, qh, ());
|
||||
@@ -114,11 +113,11 @@ fn udp_loop(connection: &protocol::Connection, pointer: &Vp, keyboard: &Vk, q: E
|
||||
loop {
|
||||
if let Some(event) = connection.receive_event() {
|
||||
match event {
|
||||
protocol::Event::Mouse { t, x, y } => { pointer.motion(t, x, y); }
|
||||
protocol::Event::Button { t, b, s } => { pointer.button(t, b, s); }
|
||||
protocol::Event::Axis { t, a, v } => { pointer.axis(t, a, v); }
|
||||
protocol::Event::Mouse { t, x, y } => { pointer.motion(t, x, y); pointer.frame(); }
|
||||
protocol::Event::Button { t, b, s } => { pointer.button(t, b, s); pointer.frame(); }
|
||||
protocol::Event::Axis { t, a, v } => { pointer.axis(t, a, v); pointer.frame(); }
|
||||
protocol::Event::Frame { } => { pointer.frame(); },
|
||||
protocol::Event::Key { t, k, s } => { keyboard.key(t, k, u32::from(s)); pointer.frame(); },
|
||||
protocol::Event::Key { t, k, s } => { keyboard.key(t, k, u32::from(s)); },
|
||||
protocol::Event::KeyModifier { mods_depressed, mods_latched, mods_locked, group } => {
|
||||
keyboard.modifiers(mods_depressed, mods_latched, mods_locked, group);
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ use wayland_protocols::{
|
||||
|
||||
use wayland_client::{
|
||||
protocol::{
|
||||
wl_buffer, wl_compositor, wl_keyboard, wl_pointer::{self, Axis, ButtonState}, wl_registry, wl_seat, wl_shm,
|
||||
wl_buffer, wl_compositor, wl_keyboard, wl_pointer, wl_registry, wl_seat, wl_shm,
|
||||
wl_shm_pool, wl_surface,
|
||||
},
|
||||
Connection, Dispatch, QueueHandle, WEnum,
|
||||
@@ -119,7 +119,6 @@ impl Dispatch<wl_registry::WlRegistry, ()> for App {
|
||||
name, interface, ..
|
||||
} = event
|
||||
{
|
||||
// println!("[{}] {} (v{})", name, interface, version);
|
||||
match &interface[..] {
|
||||
"wl_compositor" => {
|
||||
app.compositor =
|
||||
@@ -364,10 +363,10 @@ impl Dispatch<wl_pointer::WlPointer, ()> for App {
|
||||
let e = protocol::Event::Axis { t: time, a: (axis.into_result().unwrap()), v: value };
|
||||
app.connection.send_event(&e);
|
||||
}
|
||||
wl_pointer::Event::Frame {} => {
|
||||
wl_pointer::Event::Frame => {
|
||||
app.connection.send_event(&protocol::Event::Frame{});
|
||||
}
|
||||
_ => (),
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user