Skip to content

Commit e2ac8d0

Browse files
committed
x11: use deduped Modifiers
1 parent e3ec3a7 commit e2ac8d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/platform_impl/linux/x11/event_processor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use winit_core::event::{
1111
MouseScrollDelta, PointerKind, PointerSource, RawKeyEvent, SurfaceSizeWriter, TouchPhase,
1212
WindowEvent,
1313
};
14-
use winit_core::keyboard::ModifiersState;
14+
use winit_core::keyboard::Modifiers;
1515
use x11_dl::xinput2::{
1616
self, XIDeviceEvent, XIEnterEvent, XIFocusInEvent, XIFocusOutEvent, XIHierarchyEvent,
1717
XILeaveEvent, XIModifierState, XIRawEvent,
@@ -67,7 +67,7 @@ pub struct EventProcessor {
6767
// Currently focused window belonging to this process
6868
pub active_window: Option<xproto::Window>,
6969
/// Latest modifiers we've sent for the user to trigger change in event.
70-
pub modifiers: Cell<ModifiersState>,
70+
pub modifiers: Cell<Modifiers>,
7171
// Track modifiers based on keycodes. NOTE: that serials generally don't work for tracking
7272
// since they are not unique and could be duplicated in case of sequence of key events is
7373
// delivered at near the same time.
@@ -954,7 +954,7 @@ impl EventProcessor {
954954

955955
let mask = self.xkb_mod_mask_from_core(state);
956956
xkb_state.update_modifiers(mask, 0, 0, 0, 0, Self::core_keyboard_group(state));
957-
let mods: ModifiersState = xkb_state.modifiers().into();
957+
let mods: Modifiers = xkb_state.modifiers().into();
958958

959959
let event = WindowEvent::ModifiersChanged(mods.into());
960960
app.window_event(&self.target, window_id, event);
@@ -1662,7 +1662,7 @@ impl EventProcessor {
16621662
fn send_modifiers(
16631663
&self,
16641664
window_id: winit_core::window::WindowId,
1665-
modifiers: ModifiersState,
1665+
modifiers: Modifiers,
16661666
force: bool,
16671667
app: &mut dyn ApplicationHandler,
16681668
) {

0 commit comments

Comments
 (0)