summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-04-10 00:08:45 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-04-10 00:08:47 -0400
commit4014a6b05bfda06d2f5e55d9408012f14032f7c9 (patch)
tree0792e24b2372b025b5b372f4e55d33db5bb88282
parente5cf7416695c2e9454d025df63dbaa2fb6d4e4c9 (diff)
drm: Remove input devices before cancelling repaints in vt switch away
Removing the input devices will trigger events and activity that will cause a redraw. Do this before we put the compositor to sleep so we can cancel it properly and avoid immediately waking the compositor again.
-rw-r--r--src/compositor-drm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 3ac1083..763ffc8 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1504,6 +1504,11 @@ vt_func(struct weston_compositor *compositor, int event)
}
break;
case TTY_LEAVE_VT:
+ wl_list_for_each(input, &compositor->input_device_list, link) {
+ evdev_disable_udev_monitor(input);
+ evdev_remove_devices(input);
+ }
+
compositor->focus = 0;
ec->prev_state = compositor->state;
compositor->state = WESTON_COMPOSITOR_SLEEPING;
@@ -1530,11 +1535,6 @@ vt_func(struct weston_compositor *compositor, int event)
drm_output->crtc_id, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0);
- wl_list_for_each(input, &compositor->input_device_list, link) {
- evdev_disable_udev_monitor(input);
- evdev_remove_devices(input);
- }
-
if (weston_launcher_drm_set_master(&ec->base, ec->drm.fd, 0) < 0)
fprintf(stderr, "failed to drop master: %m\n");