fix(detect): fix warnings
This commit is contained in:
parent
d0e23ca2a8
commit
947edb0cbf
|
@ -25,6 +25,7 @@ pub struct xkb_rule_names {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(clippy::upper_case_acronyms)]
|
||||||
pub enum xkb_key_direction {
|
pub enum xkb_key_direction {
|
||||||
UP,
|
UP,
|
||||||
DOWN,
|
DOWN,
|
||||||
|
|
|
@ -214,7 +214,7 @@ impl Source for EVDEVSource {
|
||||||
if let Some(event) = event {
|
if let Some(event) = event {
|
||||||
// On Wayland we need to detect the global shortcuts manually
|
// On Wayland we need to detect the global shortcuts manually
|
||||||
if let InputEvent::Keyboard(key_event) = &event {
|
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 }))
|
event_callback(InputEvent::HotKey(HotKeyEvent { hotkey_id: hotkey }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ impl Source for X11Source {
|
||||||
// Register the hotkeys
|
// Register the hotkeys
|
||||||
let raw_hotkey_mapping = &mut self.raw_hotkey_mapping;
|
let raw_hotkey_mapping = &mut self.raw_hotkey_mapping;
|
||||||
self.hotkeys.iter().for_each(|hk| {
|
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 {
|
if let Some(raw_hk) = raw {
|
||||||
let result = unsafe { detect_register_hotkey(handle, raw_hk, mod_indexes) };
|
let result = unsafe { detect_register_hotkey(handle, raw_hk, mod_indexes) };
|
||||||
if result.success == 0 {
|
if result.success == 0 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user