desktop-shell: Simplify condition for focus change

We must have (from || to), because if (!from && !to), we would've caught
the if (from == to) early-return case.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-07-11 18:01:44 +01:00 committed by Marius Vlad
parent 77b9dbb730
commit db97820919

View file

@ -864,7 +864,7 @@ animate_focus_change(struct desktop_shell *shell, struct workspace *ws,
return;
output = weston_shell_utils_get_default_output(shell->compositor);
if (ws->fsurf_front == NULL && (from || to)) {
if (ws->fsurf_front == NULL) {
ws->fsurf_front = create_focus_surface(shell->compositor, output);
if (ws->fsurf_front == NULL)
return;