I understand that you're doing a few things in this patch which assume that only a single instance of
DDCutilBrightness
will be created. This is currently the case, but perhaps we could avoid hardcoding this assumption? Or if you think it's unavoidable, let's make it a proper singleton. But I think not much work is necessary to avoid going the singleton route.
If we create another instance of DDCutilBrightness
then the instance will try to lock displays that is locked by the first instance and powerdevil will be crashed. After ddcutil 2.0
released we can not lock one display by two or many processes.