summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2016-11-05 08:10:13 +0000
committerDaniel Stone <daniels@collabora.com>2016-12-12 17:18:08 +0000
commitf33e104865c85d8c3d7b24e90bc724e0b7d1e84e (patch)
tree0242b4eff697948892d74495da83ba82cb4345a5
parent47224cc9312fef05c1a523ea0da0a1aae66f100d (diff)
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>
-rw-r--r--libweston/compositor-drm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 3f21e75d..fad03172 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -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);