diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-05 14:22:13 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-05 14:22:13 -0500 |
commit | c63ba576571b8b93524165e6776f0a7e88413825 (patch) | |
tree | 7b310d4509989c08fa014ee75aeb95e1269b43db /lumina-xconfig/MainUI.cpp | |
parent | Adjust the panel settings adjustment routine a bit more. Now it will no longe... (diff) | |
parent | Clean up the rest of the xrandr parsing to account for some other variations ... (diff) | |
download | lumina-c63ba576571b8b93524165e6776f0a7e88413825.tar.gz lumina-c63ba576571b8b93524165e6776f0a7e88413825.tar.bz2 lumina-c63ba576571b8b93524165e6776f0a7e88413825.zip |
Merge branch 'master' of github.com:pcbsd/lumina
Diffstat (limited to 'lumina-xconfig/MainUI.cpp')
-rw-r--r-- | lumina-xconfig/MainUI.cpp | 10 |
1 files 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:" <<dev; + QString devres = info[i].section(" ",2,2, QString::SectionSkipEmpty); + if(!devres.contains("x")){ devres = info[i].section(" ",3,3,QString::SectionSkipEmpty); } + if(!devres.contains("x")){ devres.clear(); } + qDebug() << " - ID:" <<dev << "Current Geometry:" << devres; //qDebug() << " - Res:" << devres; if( !devres.contains("x") || !devres.contains("+") ){ devres.clear(); } //qDebug() << " - Res (modified):" << devres; @@ -76,7 +78,7 @@ void MainUI::UpdateScreens(){ //Note: devres format: "<width>x<height>+<xoffset>+<yoffset>" 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; |