mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
restore availableScreenRect behavior
--when an id is sent that is not contained at stored screens then the primary screen geometry is used instead
This commit is contained in:
parent
d71cabb016
commit
367faf6bfa
@ -316,17 +316,17 @@ 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()};
|
||||
QString scrName = m_screenPool->connector(id);
|
||||
|
||||
foreach (auto scr, screens) {
|
||||
if (scr->name() == scrName) {
|
||||
screen = scr;
|
||||
break;
|
||||
if (m_screenPool->knownIds().contains(id)) {
|
||||
QString scrName = m_screenPool->connector(id);
|
||||
|
||||
foreach (auto scr, screens) {
|
||||
if (scr->name() == scrName) {
|
||||
screen = scr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user