diff options
author | Emre Ucan <eucan@de.adit-jv.com> | 2018-06-05 10:23:00 +0200 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2018-07-22 11:06:38 +0100 |
commit | cf4113c629751adcbb9904087932e12b5621219b (patch) | |
tree | 4356a6050ff55c92810fda77c14204963d55b545 | |
parent | 280b730144cafc58dc78ac60b3a3dbe61b6b6b50 (diff) | |
download | weston-cf4113c629751adcbb9904087932e12b5621219b.tar.gz |
ivi-shell: listen compositor wake_signal
If compositor wakes up from sleep state, we have
to trigger repaint for all outputs.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | ivi-shell/ivi-shell.c | 16 | ||||
-rw-r--r-- | ivi-shell/ivi-shell.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 51e13a0f..0235d266 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -361,6 +361,8 @@ shell_destroy(struct wl_listener *listener, void *data) text_backend_destroy(shell->text_backend); input_panel_destroy(shell); + wl_list_remove(&shell->wake_listener.link); + wl_list_for_each_safe(ivisurf, next, &shell->ivi_surface_list, link) { wl_list_remove(&ivisurf->link); free(ivisurf); @@ -369,6 +371,17 @@ shell_destroy(struct wl_listener *listener, void *data) free(shell); } +/* + * Called through the compositor's wake signal. + */ +static void +wake_handler(struct wl_listener *listener, void *data) +{ + struct weston_compositor *compositor = data; + + weston_compositor_damage_all(compositor); +} + static void terminate_binding(struct weston_keyboard *keyboard, const struct timespec *time, uint32_t key, void *data) @@ -480,6 +493,9 @@ wet_shell_init(struct weston_compositor *compositor, shell->destroy_listener.notify = shell_destroy; wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener); + shell->wake_listener.notify = wake_handler; + wl_signal_add(&compositor->wake_signal, &shell->wake_listener); + if (input_panel_setup(shell) < 0) goto out; diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h index e35f75f2..2c0064d1 100644 --- a/ivi-shell/ivi-shell.h +++ b/ivi-shell/ivi-shell.h @@ -34,6 +34,7 @@ struct ivi_shell { struct wl_listener destroy_listener; + struct wl_listener wake_listener; struct weston_compositor *compositor; |