view_close now works as intended
This commit is contained in:
parent
2c57e2af46
commit
d7cf2986fa
2 changed files with 5 additions and 3 deletions
|
@ -1685,6 +1685,7 @@ static void render_containers(struct sway_output *output,
|
||||||
void render_container(struct sway_output *output,
|
void render_container(struct sway_output *output,
|
||||||
pixman_region32_t *damage, struct sway_container *con, bool focused) {
|
pixman_region32_t *damage, struct sway_container *con, bool focused) {
|
||||||
if (con->is_fading_out) {
|
if (con->is_fading_out) {
|
||||||
|
printf("rendering snapshot\n");
|
||||||
fx_render_container_snapshot(output->renderer, con);
|
fx_render_container_snapshot(output->renderer, con);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,8 +428,9 @@ void view_set_tiled(struct sway_view *view, bool tiled) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void view_close(struct sway_view *view) {
|
void view_close(struct sway_view *view) {
|
||||||
view->container->target_alpha = 0;
|
if (view->impl->close) {
|
||||||
wl_event_source_timer_update(view->container->animation_present_timer, 1);
|
view->impl->close(view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void view_close_popups(struct sway_view *view) {
|
void view_close_popups(struct sway_view *view) {
|
||||||
|
@ -956,7 +957,7 @@ void view_unmap(struct sway_view *view) {
|
||||||
wl_signal_emit_mutable(&view->events.unmap, view);
|
wl_signal_emit_mutable(&view->events.unmap, view);
|
||||||
struct sway_workspace *ws = view->container->pending.workspace;
|
struct sway_workspace *ws = view->container->pending.workspace;
|
||||||
if (ws && config->animation_duration > 0) {
|
if (ws && config->animation_duration > 0) {
|
||||||
printf("starting fade out animation");
|
printf("starting fade out animation\n");
|
||||||
view->container->is_fading_out = true;
|
view->container->is_fading_out = true;
|
||||||
fx_render_container_snapshot(ws->output->renderer, view->container);
|
fx_render_container_snapshot(ws->output->renderer, view->container);
|
||||||
view->container->target_alpha = 0;
|
view->container->target_alpha = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue