From: Mikko Rasa Date: Wed, 21 Oct 2015 10:03:59 +0000 (+0300) Subject: Store monitor names X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=85609ce268bdd6a91cd26e0bda7460862d3f38d7;p=libs%2Fgui.git Store monitor names --- diff --git a/source/graphics/monitor.h b/source/graphics/monitor.h index 18586db..35abce1 100644 --- a/source/graphics/monitor.h +++ b/source/graphics/monitor.h @@ -11,6 +11,7 @@ namespace Graphics { struct Monitor { unsigned index; + std::string name; std::list video_modes; const VideoMode *desktop_mode; VideoRotation desktop_rotation; diff --git a/source/graphics/windows/display.cpp b/source/graphics/windows/display.cpp index fdae09e..b9388e3 100644 --- a/source/graphics/windows/display.cpp +++ b/source/graphics/windows/display.cpp @@ -26,6 +26,7 @@ Display::Display(const string &): monitors.push_back(Monitor()); Monitor &monitor = monitors.back(); monitor.index = monitors.size()-1; + monitor.name = adapter_dev.DeviceString; priv->monitors.push_back(adapter_dev.DeviceName); if(adapter_dev.StateFlags&DISPLAY_DEVICE_PRIMARY_DEVICE) diff --git a/source/graphics/x11/display.cpp b/source/graphics/x11/display.cpp index b70c9a7..8f022f7 100644 --- a/source/graphics/x11/display.cpp +++ b/source/graphics/x11/display.cpp @@ -123,6 +123,7 @@ Display::Display(const string &disp_name): monitors.push_back(Monitor()); Monitor &monitor = monitors.back(); monitor.index = monitors.size()-1; + monitor.name.assign(output->name, output->nameLen); priv->monitors.push_back(res->outputs[i]); if(crtc)