fix(detect): fix warnings

This commit is contained in:
Federico Terzi 2021-10-06 19:17:59 +02:00
parent d0e23ca2a8
commit 947edb0cbf
3 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ pub struct xkb_rule_names {
}
#[repr(C)]
#[allow(clippy::upper_case_acronyms)]
pub enum xkb_key_direction {
UP,
DOWN,

View File

@ -214,7 +214,7 @@ impl Source for EVDEVSource {
if let Some(event) = event {
// On Wayland we need to detect the global shortcuts manually
if let InputEvent::Keyboard(key_event) = &event {
if let Some(hotkey) = (*hotkey_filter).process_event(&key_event) {
if let Some(hotkey) = (*hotkey_filter).process_event(key_event) {
event_callback(InputEvent::HotKey(HotKeyEvent { hotkey_id: hotkey }))
}
}

View File

@ -163,7 +163,7 @@ impl Source for X11Source {
// Register the hotkeys
let raw_hotkey_mapping = &mut self.raw_hotkey_mapping;
self.hotkeys.iter().for_each(|hk| {
let raw = convert_hotkey_to_raw(&hk);
let raw = convert_hotkey_to_raw(hk);
if let Some(raw_hk) = raw {
let result = unsafe { detect_register_hotkey(handle, raw_hk, mod_indexes) };
if result.success == 0 {