Implement `Hash` on some enums in `backend::input`
This commit is contained in:
parent
c8d56f1cf3
commit
953d9ce158
|
@ -28,6 +28,7 @@
|
||||||
#### Backends
|
#### Backends
|
||||||
|
|
||||||
- `x11rb` event source integration used in anvil's XWayland implementation is now part of smithay at `utils::x11rb`. Enabled through the `x11rb_event_source` feature.
|
- `x11rb` event source integration used in anvil's XWayland implementation is now part of smithay at `utils::x11rb`. Enabled through the `x11rb_event_source` feature.
|
||||||
|
- `KeyState`, `MouseButton`, `ButtonState` and `Axis` in `backend::input` now derive `Hash`.
|
||||||
- New `DrmNode` type in drm backend. This is primarily for use a backend which needs to run as client inside another session.
|
- New `DrmNode` type in drm backend. This is primarily for use a backend which needs to run as client inside another session.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
|
@ -77,7 +77,7 @@ impl<B: InputBackend> Event<B> for UnusedEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// State of key on a keyboard. Either pressed or released
|
/// State of key on a keyboard. Either pressed or released
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||||
pub enum KeyState {
|
pub enum KeyState {
|
||||||
/// Key is released
|
/// Key is released
|
||||||
Released,
|
Released,
|
||||||
|
@ -110,7 +110,7 @@ impl<B: InputBackend> KeyboardKeyEvent<B> for UnusedEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A particular mouse button
|
/// A particular mouse button
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||||
pub enum MouseButton {
|
pub enum MouseButton {
|
||||||
/// Left mouse button
|
/// Left mouse button
|
||||||
Left,
|
Left,
|
||||||
|
@ -123,7 +123,7 @@ pub enum MouseButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// State of a button on a pointer device, like mouse or tablet tool. Either pressed or released
|
/// State of a button on a pointer device, like mouse or tablet tool. Either pressed or released
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||||
pub enum ButtonState {
|
pub enum ButtonState {
|
||||||
/// Button is released
|
/// Button is released
|
||||||
Released,
|
Released,
|
||||||
|
@ -150,7 +150,7 @@ impl<B: InputBackend> PointerButtonEvent<B> for UnusedEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Axis when scrolling
|
/// Axis when scrolling
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||||
pub enum Axis {
|
pub enum Axis {
|
||||||
/// Vertical axis
|
/// Vertical axis
|
||||||
Vertical,
|
Vertical,
|
||||||
|
|
Loading…
Reference in New Issue