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.
This commit is contained in:
Ander Conselvan de Oliveira 2013-02-21 18:35:23 +02:00 committed by Kristian Høgsberg
parent 87524b65cb
commit a4575634f4
5 changed files with 21 additions and 21 deletions

View File

@ -154,7 +154,7 @@ weston_surface_animation_frame(struct weston_animation *base,
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 *

View File

@ -1592,7 +1592,7 @@ weston_compositor_wake(struct weston_compositor *compositor)
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 @@ idle_handler(void *data)
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 @@ 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);

View File

@ -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;

View File

@ -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;

View File

@ -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,