diff options
-rw-r--r-- | src/intel_device.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index adcd6c01..a55f62b2 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -312,20 +312,18 @@ int intel_open_device(int entity_num, if (dev == NULL) goto err_close; + /* If hosted under a system compositor, just pretend to be master */ + if (hosted()) + master_count++; + dev->fd = fd; - dev->open_count = 0; + dev->open_count = master_count; dev->master_count = master_count; dev->master_node = path; dev->render_node = find_render_node(fd); if (dev->render_node == NULL) dev->render_node = dev->master_node; - /* If hosted under a system compositor, just pretend to be master */ - if (hosted()) { - dev->open_count++; - dev->master_count++; - } - xf86GetEntityPrivate(entity_num, intel_device_key)->ptr = dev; return fd; |