Fix refreshing MainWindow::desktopRect.

This commit is contained in:
John Preston 2021-03-13 14:37:58 +04:00
parent a5abe3d813
commit ae5c7b19f6

View file

@ -220,7 +220,7 @@ void MainWindow::updateWindowIcon() {
QRect MainWindow::desktopRect() const {
const auto now = crl::now();
if (now >= _monitorLastGot && now <= _monitorLastGot + crl::time(1000)) {
if (!_monitorLastGot || now >= _monitorLastGot + crl::time(1000)) {
_monitorLastGot = now;
_monitorRect = computeDesktopRect();
}