Implement `Hash` on some enums in `backend::input`
This commit is contained in:
parent
c8d56f1cf3
commit
953d9ce158
|
@ -28,6 +28,7 @@
|
|||
#### 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.
|
||||
- `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.
|
||||
|
||||
### Bugfixes
|
||||
|
|
|
@ -77,7 +77,7 @@ impl<B: InputBackend> Event<B> for UnusedEvent {
|
|||
}
|
||||
|
||||
/// 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 {
|
||||
/// Key is released
|
||||
Released,
|
||||
|
@ -110,7 +110,7 @@ impl<B: InputBackend> KeyboardKeyEvent<B> for UnusedEvent {
|
|||
}
|
||||
|
||||
/// A particular mouse button
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub enum MouseButton {
|
||||
/// Left mouse button
|
||||
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
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub enum ButtonState {
|
||||
/// Button is released
|
||||
Released,
|
||||
|
@ -150,7 +150,7 @@ impl<B: InputBackend> PointerButtonEvent<B> for UnusedEvent {
|
|||
}
|
||||
|
||||
/// Axis when scrolling
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub enum Axis {
|
||||
/// Vertical axis
|
||||
Vertical,
|
||||
|
|
Loading…
Reference in New Issue