drm: drop master if unnecessary
This commit is contained in:
parent
6340351c3b
commit
035ae36dad
1 changed files with 3 additions and 0 deletions
3
drm.c
3
drm.c
|
@ -474,6 +474,9 @@ int drm_open() {
|
|||
{
|
||||
KMSVNC_FATAL("card %s open failed: %s\n", kmsvnc->card, strerror(errno));
|
||||
}
|
||||
if (!kmsvnc->screen_blank && drmIsMaster(drm->drm_fd)) {
|
||||
if (drmDropMaster(drm->drm_fd)) fprintf(stderr, "Failed to drop master");
|
||||
}
|
||||
if (kmsvnc->screen_blank && !drmIsMaster(drm->drm_fd)) {
|
||||
drm->drm_master_fd = drm_get_master_fd();
|
||||
drm->drm_master_fd = drm->drm_master_fd > 0 ? drm->drm_master_fd : 0;
|
||||
|
|
Loading…
Reference in a new issue