focus: Allow updating cursor to already focused window

This commit is contained in:
Victoria Brekenfeld 2024-09-09 20:02:36 +02:00
parent f0f1db4358
commit 16d9902770

View file

@ -228,7 +228,7 @@ fn update_focus_state(
// update keyboard focus
if let Some(keyboard) = seat.get_keyboard() {
if should_update_cursor && state.common.config.cosmic_conf.cursor_follows_focus {
if ActiveFocus::get(seat).as_ref() != target && target.is_some() {
if target.is_some() {
//need to borrow mutably for surface under
let mut shell = state.common.shell.write().unwrap();
// get the top left corner of the target element