compositor-drm: Remove open-coded weston_compositor_wake

This always changes the state to ACTIVE when we enter the session,
whereas the previous implementation preserved the state (i.e. if state
was SLEEPING on exit, it would be restored to SLEEPING, but also with a
repaint). This seems more helpful behaviour, however: if you enter a
session, it's probably in order to interact with it.

Differential Revision: https://phabricator.freedesktop.org/D1482

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Daniel Stone 2016-11-05 08:10:13 +00:00
parent 47224cc931
commit f33e104865

View file

@ -114,8 +114,6 @@ struct drm_backend {
int use_pixman;
uint32_t prev_state;
struct udev_input input;
int32_t cursor_width;
@ -2816,14 +2814,13 @@ session_notify(struct wl_listener *listener, void *data)
if (compositor->session_active) {
weston_log("activating session\n");
compositor->state = b->prev_state;
weston_compositor_wake(compositor);
weston_compositor_damage_all(compositor);
udev_input_enable(&b->input);
} else {
weston_log("deactivating session\n");
udev_input_disable(&b->input);
b->prev_state = compositor->state;
weston_compositor_offscreen(compositor);
/* If we have a repaint scheduled (either from a
@ -3180,8 +3177,6 @@ drm_backend_create(struct weston_compositor *compositor,
b->base.destroy = drm_destroy;
b->base.restore = drm_restore;
b->prev_state = WESTON_COMPOSITOR_ACTIVE;
weston_setup_vt_switch_bindings(compositor);
wl_list_init(&b->sprite_list);