restore availableScreenRect behavior

--when an id is sent that is not contained
at stored screens then the primary screen
geometry is used instead
v0.6
Michail Vourlakos 8 years ago
parent d71cabb016
commit 367faf6bfa

@ -316,11 +316,10 @@ QRegion DockCorona::availableScreenRegion(int id) const
QRect DockCorona::availableScreenRect(int id) const
{
if (!m_screenPool->knownIds().contains(id))
return {};
const auto screens = qGuiApp->screens();
const QScreen *screen{qGuiApp->primaryScreen()};
if (m_screenPool->knownIds().contains(id)) {
QString scrName = m_screenPool->connector(id);
foreach (auto scr, screens) {
@ -329,6 +328,7 @@ QRect DockCorona::availableScreenRect(int id) const
break;
}
}
}
if (!screen)
return {};

Loading…
Cancel
Save