seat: add KeyboardState and dynamically switch between states
This commit is contained in:
parent
134e3cc316
commit
5e2cdef388
15 changed files with 406 additions and 222 deletions
|
|
@ -65,7 +65,7 @@ use {
|
|||
wl_surface::*, WlOutputId, WlSurfaceId, ZwpIdleInhibitorV1Id,
|
||||
ZwpLinuxDmabufFeedbackV1Id,
|
||||
},
|
||||
xkbcommon::ModifierState,
|
||||
xkbcommon::KeyboardState,
|
||||
xwayland::XWaylandEvent,
|
||||
},
|
||||
ahash::AHashMap,
|
||||
|
|
@ -1376,12 +1376,19 @@ impl Node for WlSurface {
|
|||
self.toplevel.get()
|
||||
}
|
||||
|
||||
fn node_on_key(&self, seat: &WlSeatGlobal, time_usec: u64, key: u32, state: u32) {
|
||||
seat.key_surface(self, time_usec, key, state);
|
||||
fn node_on_key(
|
||||
&self,
|
||||
seat: &WlSeatGlobal,
|
||||
time_usec: u64,
|
||||
key: u32,
|
||||
state: u32,
|
||||
kb_state: &KeyboardState,
|
||||
) {
|
||||
seat.key_surface(self, time_usec, key, state, kb_state);
|
||||
}
|
||||
|
||||
fn node_on_mods(&self, seat: &WlSeatGlobal, mods: ModifierState) {
|
||||
seat.mods_surface(self, mods);
|
||||
fn node_on_mods(&self, seat: &WlSeatGlobal, kb_state: &KeyboardState) {
|
||||
seat.mods_surface(self, kb_state);
|
||||
}
|
||||
|
||||
fn node_on_button(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue