fix(compositor): pass owned surface to keyboard.set_focus, remove redundant clone

This commit is contained in:
Marco Allegretti 2026-03-10 21:31:59 +01:00
parent ae1d572803
commit 767da43047

View file

@ -127,7 +127,7 @@ fn handle_pointer_button<B: InputBackend>(
let pointer_location = state.pointer_location; let pointer_location = state.pointer_location;
if let Some((surface, _loc)) = surface_under(state, pointer_location) { if let Some((surface, _loc)) = surface_under(state, pointer_location) {
if let Some(keyboard) = state.seat.get_keyboard() { if let Some(keyboard) = state.seat.get_keyboard() {
keyboard.set_focus(state, Some(surface.clone()), serial); keyboard.set_focus(state, Some(surface), serial);
} }
} else if let Some(keyboard) = state.seat.get_keyboard() { } else if let Some(keyboard) = state.seat.get_keyboard() {
keyboard.set_focus(state, None, serial); keyboard.set_focus(state, None, serial);