[vlc-commits] skins2(Linux): display list of monitors and caracteristics for debug

Erwan Tulou git at videolan.org
Wed Jun 27 18:57:24 CEST 2012


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Jun 25 11:55:59 2012 +0200| [6da1479bbdcbb2c186f3c1c7c31455c458ac7802] | committer: Erwan Tulou

skins2(Linux): display list of monitors and caracteristics for debug

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6da1479bbdcbb2c186f3c1c7c31455c458ac7802
---

 modules/gui/skins2/x11/x11_factory.cpp |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/modules/gui/skins2/x11/x11_factory.cpp b/modules/gui/skins2/x11/x11_factory.cpp
index 26b881d..4e3e966 100644
--- a/modules/gui/skins2/x11/x11_factory.cpp
+++ b/modules/gui/skins2/x11/x11_factory.cpp
@@ -94,6 +94,19 @@ bool X11Factory::init()
     // Determine the monitor geometry
     getDefaultGeometry( &m_screenWidth, &m_screenHeight );
 
+    // list all available monitors
+    int num_screen;
+    XineramaScreenInfo* info = XineramaQueryScreens( pDisplay, &num_screen );
+    if( info )
+    {
+        msg_Dbg( getIntf(), "number of monitors detected : %i", num_screen );
+        for( int i = 0; i < num_screen; i++ )
+            msg_Dbg( getIntf(), "  monitor #%i : %ix%i at +%i+%i",
+                                i, info[i].width, info[i].height,
+                                info[i].x_org, info[i].y_org );
+        XFree( info );
+    }
+
     return true;
 }
 



More information about the vlc-commits mailing list