mirror of
https://github.com/swaywm/sway.git
synced 2024-11-30 03:41:27 +00:00
Avoid assert on container type.
This commit is contained in:
parent
1b8de39287
commit
b57f88e7db
|
@ -178,18 +178,13 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
|
||||||
} else {
|
} else {
|
||||||
struct sway_container *next_focus =
|
struct sway_container *next_focus =
|
||||||
seat_get_focus_inactive(cursor->seat, &root_container);
|
seat_get_focus_inactive(cursor->seat, &root_container);
|
||||||
if (next_focus) {
|
if (next_focus && next_focus->type == C_VIEW &&
|
||||||
if (!sway_assert(next_focus->type == C_VIEW,
|
view_is_visible(next_focus->sway_view)) {
|
||||||
"focus inactive container is not a view")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (view_is_visible(next_focus->sway_view)) {
|
|
||||||
seat_set_focus_warp(cursor->seat, next_focus, false);
|
seat_set_focus_warp(cursor->seat, next_focus, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// reset cursor if switching between clients
|
// reset cursor if switching between clients
|
||||||
struct wl_client *client = NULL;
|
struct wl_client *client = NULL;
|
||||||
|
|
Loading…
Reference in a new issue