return sane screen geometry on missing randr
may help in the xinerama case, follow up to https://git.reviewboard.kde.org/r/125074/ REVIEW: 125456
This commit is contained in:
parent
ed2314dfbe
commit
7e72aee474
1 changed files with 3 additions and 1 deletions
|
@ -38,6 +38,7 @@ void XRandRScreens::update()
|
|||
auto fallback = [this]() {
|
||||
m_geometries << QRect();
|
||||
m_refreshRates << -1.0f;
|
||||
m_names << "Xinerama";
|
||||
setCount(1);
|
||||
};
|
||||
m_geometries.clear();
|
||||
|
@ -124,7 +125,8 @@ QRect XRandRScreens::geometry(int screen) const
|
|||
if (screen >= m_geometries.size() || screen < 0) {
|
||||
return QRect();
|
||||
}
|
||||
return m_geometries.at(screen);
|
||||
return m_geometries.at(screen).isValid() ? m_geometries.at(screen) :
|
||||
QRect(0, 0, displayWidth(), displayHeight()); // xinerama, lacks RandR
|
||||
}
|
||||
|
||||
QString XRandRScreens::name(int screen) const
|
||||
|
|
Loading…
Reference in a new issue