further fixes for exotic xrandr outputs
This commit is contained in:
parent
a33e83ee38
commit
0b83683ed1
|
@ -92,6 +92,8 @@ public class XRandR {
|
|||
}
|
||||
name = sa[0];
|
||||
|
||||
// enabled?
|
||||
if (sa.length > 2) {
|
||||
// save position of this screen, will be used later when current modeline is parsed
|
||||
if ( "primary".equals(sa[2]) ) {
|
||||
parseScreenHeader(currentScreenPosition, sa[3]);
|
||||
|
@ -101,6 +103,17 @@ public class XRandR {
|
|||
parseScreenHeader(currentScreenPosition, sa[2]);
|
||||
}
|
||||
} else {
|
||||
// disabled screen, no position info available
|
||||
currentScreenPosition[0] = 0;
|
||||
currentScreenPosition[1] = 0;
|
||||
}
|
||||
} else if ("disconnected".equals(sa[1])) {
|
||||
// previous screen block is over
|
||||
if (name != null) {
|
||||
screens.put(name, possibles.toArray(new Screen[possibles.size()]));
|
||||
name = null;
|
||||
}
|
||||
} else if (name != null) { // only read modelines after a valid screen identifier
|
||||
Matcher m = SCREEN_MODELINE_PATTERN.matcher(sa[0]);
|
||||
if ( m.matches() ) {
|
||||
// found a new mode line
|
||||
|
@ -113,7 +126,9 @@ public class XRandR {
|
|||
}
|
||||
}
|
||||
|
||||
if (name != null) {
|
||||
screens.put(name, possibles.toArray(new Screen[possibles.size()]));
|
||||
}
|
||||
|
||||
current = currentList.toArray(new Screen[currentList.size()]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue