Return intersection of KWS::workArea() and QScreen::availableGeometry()
KWindowSystem::workArea() gives us the whole workarea, which in case of dual screens is the whole virtual desktop. QApplication::desktop()->availableGeometry(id) gives the full screen geometry for the given screen. So we just intersect them and have a proper availableScreenRect(). This is just a temporary method until the patch in [1] is merged in Qt and released, then we can revert back to the commented method. [1] - https://codereview.qt-project.org/#change,80606 BUG: 331968
This commit is contained in:
parent
cc8de5a789
commit
b36ba7c9b6
@ -326,7 +326,10 @@ QRegion ShellCorona::availableScreenRegion(int id) const
|
||||
|
||||
QRect ShellCorona::availableScreenRect(int id) const
|
||||
{
|
||||
return QApplication::desktop()->availableGeometry(id);
|
||||
//return QApplication::desktop()->availableGeometry(id);
|
||||
//FIXME: revert back to this^ after https://codereview.qt-project.org/#change,80606 has been merged
|
||||
// and released (and we depend on it)
|
||||
return KWindowSystem::workArea(id).intersect(QApplication::desktop()->availableGeometry(id));
|
||||
}
|
||||
|
||||
PanelView *ShellCorona::panelView(Plasma::Containment *containment) const
|
||||
|
Loading…
Reference in New Issue
Block a user