]> git.sesse.net Git - vlc/commitdiff
skins2(Linux): display list of monitors and caracteristics for debug
authorErwan Tulou <erwan10@videolan.org>
Mon, 25 Jun 2012 09:55:59 +0000 (11:55 +0200)
committerErwan Tulou <erwan10@videolan.org>
Wed, 27 Jun 2012 16:52:48 +0000 (18:52 +0200)
modules/gui/skins2/x11/x11_factory.cpp

index 26b881d78d2c4909d1f276502003b9966545f3fe..4e3e9664040621dd0ccb5546335b7c48e0f0b286 100644 (file)
@@ -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;
 }