diff options
author | Timothy Pearson <[email protected]> | 2013-01-09 16:37:06 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-09 16:37:06 -0600 |
commit | e9b3f195e2d568e25b8b73810503518e4e7f8480 (patch) | |
tree | 0e11dba628e359cd1145f1ddd63786a351a50cb8 /tdecore/tdehardwaredevices.cpp | |
parent | 511779841007afca5231e6c69e996eba0295eaae (diff) | |
download | tdelibs-e9b3f195e2d568e25b8b73810503518e4e7f8480.tar.gz tdelibs-e9b3f195e2d568e25b8b73810503518e4e7f8480.zip |
Add monitor hotplug notification support to TDE hardware devices library
Fix spurious xcalib pipe error notifications
Fix krandr available resolution detection
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index e143e00d5..c0c97679a 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -2002,7 +2002,18 @@ void TDEHardwareDevices::processHotPluggedHardware() { emit hardwareUpdated(hwdevice); emit hardwareEvent(TDEHardwareEvent::HardwareUpdated, hwdevice->uniqueID()); } - break; + } + else if ((hwdevice->type() == TDEGenericDeviceType::Monitor) + && (hwdevice->systemPath().contains(systempath))) { + if (!hwdevice->blacklistedForUpdate()) { + struct udev_device *slavedev; + slavedev = udev_device_new_from_syspath(m_udevStruct, hwdevice->systemPath().ascii()); + classifyUnknownDevice(slavedev, hwdevice, false); + udev_device_unref(slavedev); + updateParentDeviceInformation(hwdevice); // Update parent/child tables for this device + emit hardwareUpdated(hwdevice); + emit hardwareEvent(TDEHardwareEvent::HardwareUpdated, hwdevice->uniqueID()); + } } } } @@ -4289,6 +4300,9 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD mdevice->internalSetVendorModel(monitor_info.second); mdevice->m_friendlyName = monitor_info.first + " " + monitor_info.second; } + else { + mdevice->m_friendlyName = i18n("Generic %1 Device").arg(genericPortName); + } mdevice->internalSetEdid(getEDID(mdevice->systemPath())); } else { |