shell: Eliminate unneeded function.
Replace all occurrences of workspace_damage_all_surfaces() with
weston_compositor_schedule_repaint(). This fixes a bug exposed by
982387011f where trying to switch workspaces while there are no
surfaces on the current workspace fails to start the animation.
This commit is contained in:
committed by
Kristian Høgsberg
parent
ac3e5f2feb
commit
4272e63991
+5
-19
@@ -576,15 +576,6 @@ workspace_translate_in(struct workspace *ws, double fraction)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
workspace_damage_all_surfaces(struct workspace *ws)
|
|
||||||
{
|
|
||||||
struct weston_surface *surface;
|
|
||||||
|
|
||||||
wl_list_for_each(surface, &ws->layer.surface_list, layer_link)
|
|
||||||
weston_surface_damage(surface);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reverse_workspace_change_animation(struct desktop_shell *shell,
|
reverse_workspace_change_animation(struct desktop_shell *shell,
|
||||||
unsigned int index,
|
unsigned int index,
|
||||||
@@ -600,8 +591,7 @@ reverse_workspace_change_animation(struct desktop_shell *shell,
|
|||||||
|
|
||||||
restore_focus_state(shell, to);
|
restore_focus_state(shell, to);
|
||||||
|
|
||||||
workspace_damage_all_surfaces(from);
|
weston_compositor_schedule_repaint(shell->compositor);
|
||||||
workspace_damage_all_surfaces(to);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -623,8 +613,7 @@ finish_workspace_change_animation(struct desktop_shell *shell,
|
|||||||
struct workspace *from,
|
struct workspace *from,
|
||||||
struct workspace *to)
|
struct workspace *to)
|
||||||
{
|
{
|
||||||
workspace_damage_all_surfaces(from);
|
weston_compositor_schedule_repaint(shell->compositor);
|
||||||
workspace_damage_all_surfaces(to);
|
|
||||||
|
|
||||||
wl_list_remove(&shell->workspaces.animation.link);
|
wl_list_remove(&shell->workspaces.animation.link);
|
||||||
workspace_deactivate_transforms(from);
|
workspace_deactivate_transforms(from);
|
||||||
@@ -673,15 +662,13 @@ animate_workspace_change_frame(struct weston_animation *animation,
|
|||||||
y = sin(x);
|
y = sin(x);
|
||||||
|
|
||||||
if (t < DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH) {
|
if (t < DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH) {
|
||||||
workspace_damage_all_surfaces(from);
|
weston_compositor_schedule_repaint(shell->compositor);
|
||||||
workspace_damage_all_surfaces(to);
|
|
||||||
|
|
||||||
workspace_translate_out(from, shell->workspaces.anim_dir * y);
|
workspace_translate_out(from, shell->workspaces.anim_dir * y);
|
||||||
workspace_translate_in(to, shell->workspaces.anim_dir * y);
|
workspace_translate_in(to, shell->workspaces.anim_dir * y);
|
||||||
shell->workspaces.anim_current = y;
|
shell->workspaces.anim_current = y;
|
||||||
|
|
||||||
workspace_damage_all_surfaces(from);
|
weston_compositor_schedule_repaint(shell->compositor);
|
||||||
workspace_damage_all_surfaces(to);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
finish_workspace_change_animation(shell, from, to);
|
finish_workspace_change_animation(shell, from, to);
|
||||||
@@ -721,8 +708,7 @@ animate_workspace_change(struct desktop_shell *shell,
|
|||||||
|
|
||||||
restore_focus_state(shell, to);
|
restore_focus_state(shell, to);
|
||||||
|
|
||||||
workspace_damage_all_surfaces(from);
|
weston_compositor_schedule_repaint(shell->compositor);
|
||||||
workspace_damage_all_surfaces(to);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user