Seat: avoid leaking eaten keys to client on focus
Until now, Seat.setFocusRaw sent all pressed keys to the client, including ones that should be eaten. (Try e.g. changing focus to a nested wlroots compositor with a terminal open to easily see it.) However, only filtering out the eaten keys is not enough; they were eaten only once all mappings had been executed. Therefore, the original function had to be split into one looking up mappings and another executing them.
This commit is contained in:
@ -50,3 +50,8 @@ pub fn remove(self: *Self, old: u32) bool {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Removes other's contents from self (if present)
|
||||
pub fn subtract(self: *Self, other: Self) void {
|
||||
for (other.items[0..other.len]) |item| _ = self.remove(item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user