compositor: Rename lock and unlock signals to idle and wake
After the changes introduced in the previous patch, those names are
more appropriate. It is up to the shell to decide when to lock the
screen.
diff --git a/src/animation.c b/src/animation.c
index 5b6db31..9e2ad4e 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -154,7 +154,7 @@
animation->frame(animation);
animation->surface->geometry.dirty = 1;
- weston_surface_schedule_repaint(animation->surface);
+ weston_compositor_schedule_repaint(animation->surface->compositor);
}
static struct weston_surface_animation *
diff --git a/src/compositor.c b/src/compositor.c
index eb453d0..5ff68d7 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1592,7 +1592,7 @@
weston_compositor_dpms(compositor, WESTON_DPMS_ON);
/* fall through */
case WESTON_COMPOSITOR_IDLE:
- wl_signal_emit(&compositor->unlock_signal, compositor);
+ wl_signal_emit(&compositor->wake_signal, compositor);
/* fall through */
default:
compositor->state = WESTON_COMPOSITOR_ACTIVE;
@@ -1634,7 +1634,7 @@
return 1;
compositor->state = WESTON_COMPOSITOR_IDLE;
- wl_signal_emit(&compositor->lock_signal, compositor);
+ wl_signal_emit(&compositor->idle_signal, compositor);
return 1;
}
@@ -3012,8 +3012,8 @@
wl_signal_init(&ec->destroy_signal);
wl_signal_init(&ec->activate_signal);
wl_signal_init(&ec->kill_signal);
- wl_signal_init(&ec->lock_signal);
- wl_signal_init(&ec->unlock_signal);
+ wl_signal_init(&ec->idle_signal);
+ wl_signal_init(&ec->wake_signal);
wl_signal_init(&ec->show_input_panel_signal);
wl_signal_init(&ec->hide_input_panel_signal);
wl_signal_init(&ec->seat_created_signal);
diff --git a/src/compositor.h b/src/compositor.h
index fdee03c..676e0d9 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -296,8 +296,8 @@
struct wl_signal activate_signal;
struct wl_signal kill_signal;
- struct wl_signal lock_signal;
- struct wl_signal unlock_signal;
+ struct wl_signal idle_signal;
+ struct wl_signal wake_signal;
struct wl_signal show_input_panel_signal;
struct wl_signal hide_input_panel_signal;
diff --git a/src/shell.c b/src/shell.c
index 8175f9a..ed6f434 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -83,8 +83,8 @@
struct desktop_shell {
struct weston_compositor *compositor;
- struct wl_listener lock_listener;
- struct wl_listener unlock_listener;
+ struct wl_listener idle_listener;
+ struct wl_listener wake_listener;
struct wl_listener destroy_listener;
struct wl_listener show_input_panel_listener;
struct wl_listener hide_input_panel_listener;
@@ -2894,20 +2894,20 @@
}
static void
-lock_handler(struct wl_listener *listener, void *data)
+idle_handler(struct wl_listener *listener, void *data)
{
struct desktop_shell *shell =
- container_of(listener, struct desktop_shell, lock_listener);
+ container_of(listener, struct desktop_shell, idle_listener);
shell_fade(shell, FADE_OUT);
/* lock() is called from shell_fade_done() */
}
static void
-unlock_handler(struct wl_listener *listener, void *data)
+wake_handler(struct wl_listener *listener, void *data)
{
struct desktop_shell *shell =
- container_of(listener, struct desktop_shell, unlock_listener);
+ container_of(listener, struct desktop_shell, wake_listener);
unlock(shell);
}
@@ -3965,8 +3965,8 @@
if (shell->child.client)
wl_client_destroy(shell->child.client);
- wl_list_remove(&shell->lock_listener.link);
- wl_list_remove(&shell->unlock_listener.link);
+ wl_list_remove(&shell->idle_listener.link);
+ wl_list_remove(&shell->wake_listener.link);
wl_list_remove(&shell->show_input_panel_listener.link);
wl_list_remove(&shell->hide_input_panel_listener.link);
@@ -4070,10 +4070,10 @@
shell->destroy_listener.notify = shell_destroy;
wl_signal_add(&ec->destroy_signal, &shell->destroy_listener);
- shell->lock_listener.notify = lock_handler;
- wl_signal_add(&ec->lock_signal, &shell->lock_listener);
- shell->unlock_listener.notify = unlock_handler;
- wl_signal_add(&ec->unlock_signal, &shell->unlock_listener);
+ shell->idle_listener.notify = idle_handler;
+ wl_signal_add(&ec->idle_signal, &shell->idle_listener);
+ shell->wake_listener.notify = wake_handler;
+ wl_signal_add(&ec->wake_signal, &shell->wake_listener);
shell->show_input_panel_listener.notify = show_input_panels;
wl_signal_add(&ec->show_input_panel_signal, &shell->show_input_panel_listener);
shell->hide_input_panel_listener.notify = hide_input_panels;
diff --git a/src/tablet-shell.c b/src/tablet-shell.c
index 57226e8..9006b19 100644
--- a/src/tablet-shell.c
+++ b/src/tablet-shell.c
@@ -547,9 +547,9 @@
shell->destroy_listener.notify = tablet_shell_destroy;
wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener);
shell->lock_listener.notify = tablet_shell_lock;
- wl_signal_add(&compositor->lock_signal, &shell->lock_listener);
+ wl_signal_add(&compositor->idle_signal, &shell->lock_listener);
shell->unlock_listener.notify = tablet_shell_unlock;
- wl_signal_add(&compositor->unlock_signal, &shell->unlock_listener);
+ wl_signal_add(&compositor->wake_signal, &shell->unlock_listener);
/* FIXME: This will make the object available to all clients. */
wl_display_add_global(compositor->wl_display, &tablet_shell_interface,