From 51223fdf7967adb14c3f84bb1eefc4a2d0f012f8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 5 Mar 2015 12:52:31 -0500 Subject: Clean up the rest of the xrandr parsing to account for some other variations in the output. --- lumina-xconfig/MainUI.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lumina-xconfig/MainUI.cpp b/lumina-xconfig/MainUI.cpp index 7a4f5174..4fa9236f 100644 --- a/lumina-xconfig/MainUI.cpp +++ b/lumina-xconfig/MainUI.cpp @@ -56,11 +56,13 @@ void MainUI::UpdateScreens(){ SCREENS << cscreen; //current screen finished - save it into the array cscreen = ScreenInfo(); //Now create a new structure } + //qDebug() << "Line:" << info[i]; QString dev = info[i].section(" ",0,0); //device ID //The device resolution can be either the 3rd or 4th output - check both - QString devres = info[i].section(" ",2,2); - if(!devres.contains("x")){ devres = info[i].section(" ",3,3); } - qDebug() << " - ID:" <x++" cscreen.geom.setRect( devres.section("+",-2,-2).toInt(), devres.section("+",-1,-1).toInt(), devres.section("x",0,0).toInt(), devres.section("+",0,0).section("x",1,1).toInt() ); - }else if(info[i].contains(" connected ")){ + }else if(info[i].contains(" connected")){ //Device that is connected, but not attached qDebug() << "Create new Screen entry:" << dev << "none"; cscreen.ID = dev; -- cgit