From 034f49872603dcf541f52153db670657217e14df Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Thu, 29 Dec 2022 22:11:32 +0100 Subject: [PATCH] cleanup --- src/bin/server.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index 206031a..7f34255 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -28,13 +28,13 @@ use wayland_protocols_wlr::layer_shell::v1::client::{ }; use wayland_client::{ - delegate_noop, + delegate_noop, delegate_dispatch, globals::{registry_queue_init, GlobalListContents}, protocol::{ wl_buffer, wl_compositor, wl_keyboard, wl_pointer, wl_region, wl_registry, wl_seat, wl_shm, wl_shm_pool, wl_surface, }, - Connection, Dispatch, QueueHandle, WEnum, delegate_dispatch, + Connection, Dispatch, QueueHandle, WEnum, }; use tempfile; @@ -313,18 +313,7 @@ impl Dispatch for App { app.connection.send_event(event); if mods_depressed == 77 { // ctrl shift super alt - if let Some(pointer_lock) = app.pointer_lock.as_ref() { - pointer_lock.destroy(); - app.pointer_lock = None; - } - if let Some(rel_pointer) = app.rel_pointer.as_ref() { - rel_pointer.destroy(); - app.rel_pointer = None; - } - if let Some(shortcut_inhibitor) = app.shortcut_inhibitor.as_ref() { - shortcut_inhibitor.destroy(); - app.shortcut_inhibitor = None; - } + app.ungrab(); } } wl_keyboard::Event::Keymap {