track pressed keys in input-capture (#170)

move pressed key tracking to input capture
This commit is contained in:
Ferdinand Schober
2024-08-09 13:18:23 +02:00
committed by GitHub
parent 096567640c
commit 266ad28c6b
9 changed files with 125 additions and 77 deletions

View File

@@ -58,15 +58,13 @@ use wayland_client::{
Connection, Dispatch, DispatchError, EventQueue, QueueHandle, WEnum,
};
use tempfile;
use input_event::{Event, KeyboardEvent, PointerEvent};
use crate::CaptureError;
use super::{
error::{LayerShellCaptureCreationError, WaylandBindError},
CaptureHandle, InputCapture, Position,
Capture, CaptureHandle, Position,
};
struct Globals {
@@ -561,7 +559,7 @@ impl Inner {
}
#[async_trait]
impl InputCapture for WaylandInputCapture {
impl Capture for WaylandInputCapture {
async fn create(&mut self, handle: CaptureHandle, pos: Position) -> Result<(), CaptureError> {
self.add_client(handle, pos);
let inner = self.0.get_mut();