Check version before release
This commit is contained in:
parent
b783b2250c
commit
87ac92595b
1 changed files with 6 additions and 2 deletions
|
|
@ -667,8 +667,10 @@ fn implement_seat(
|
|||
}
|
||||
} else if let Some(pointer) = pointer.take() {
|
||||
// Release old pointer
|
||||
if pointer.as_ref().version() >= 3 {
|
||||
pointer.release();
|
||||
}
|
||||
}
|
||||
|
||||
if capabilities.contains(Capability::Keyboard) {
|
||||
if keyboard.is_none() {
|
||||
|
|
@ -731,9 +733,11 @@ fn implement_seat(
|
|||
}
|
||||
} else if let Some(keyboard) = keyboard.take() {
|
||||
// Release old keyboard
|
||||
if keyboard.as_ref().version() >= 3 {
|
||||
keyboard.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue