[PATCH weston 8/8] compositor: Rename lock and unlock signals to idle and wake
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Thu Feb 21 08:35:23 PST 2013
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.
---
src/compositor.c | 4 ++--
src/compositor.h | 4 ++--
src/shell.c | 24 ++++++++++++------------
src/tablet-shell.c | 4 ++--
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 4d0d908..1b9621d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3012,8 +3012,8 @@ weston_compositor_init(struct weston_compositor *ec,
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 weston_compositor {
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 input_panel_surface {
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 @@ shell_fade(struct desktop_shell *shell, enum fade_type type)
}
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 @@ shell_destroy(struct wl_listener *listener, void *data)
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 @@ module_init(struct weston_compositor *ec,
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 @@ module_init(struct weston_compositor *compositor,
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,
--
1.7.10.4
More information about the wayland-devel
mailing list