Turn off hardware cursors on VT switch before dropping DRM master.
authorMatt Roper <matthew.d.roper@intel.com>
Sat, 27 Aug 2011 00:36:49 +0000 (17:36 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 27 Aug 2011 16:10:19 +0000 (12:10 -0400)
The DRM cursor ioctl requires DRM master.  We shouldn't drop
master until after we're done turning off the hardware cursors
for a VT switch.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
compositor/compositor-drm.c

index 536760b..c28c7d2 100644 (file)
@@ -745,11 +745,11 @@ vt_func(struct wlsc_compositor *compositor, int event)
        case TTY_LEAVE_VT:
                compositor->focus = 0;
                compositor->state = WLSC_COMPOSITOR_SLEEPING;
-               drmDropMaster(ec->drm.fd);
 
                wl_list_for_each(output, &ec->base.output_list, link)
                        drm_output_set_cursor(output, NULL);
 
+               drmDropMaster(ec->drm.fd);
                break;
        };
 }