]> git.tdb.fi Git - libs/gui.git/commitdiff
Store monitor names
authorMikko Rasa <tdb@tdb.fi>
Wed, 21 Oct 2015 10:03:59 +0000 (13:03 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 21 Oct 2015 10:03:59 +0000 (13:03 +0300)
source/graphics/monitor.h
source/graphics/windows/display.cpp
source/graphics/x11/display.cpp

index 18586db50d4782f8871ca0c6e459b90df74b12bf..35abce19d5e511ead6cb05fe40a7c6935b6ff5e8 100644 (file)
@@ -11,6 +11,7 @@ namespace Graphics {
 struct Monitor
 {
        unsigned index;
+       std::string name;
        std::list<const VideoMode *> video_modes;
        const VideoMode *desktop_mode;
        VideoRotation desktop_rotation;
index fdae09e362e5abe25c8c29d34a5380d351a6b1ae..b9388e31f8ed297b85efbe20bd44b488bf7cc5b4 100644 (file)
@@ -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)
index b70c9a7c197866179a95b26bf4aae26d7e3d16bd..8f022f7957a8af1c5df81d5844fe7e7683d2a7d9 100644 (file)
@@ -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)