Handle locked screen as overlapping window.

This commit is contained in:
John Preston 2021-04-27 12:33:23 +04:00
parent db1df1b4bd
commit 14c67cf724
3 changed files with 7 additions and 0 deletions

View file

@ -36,6 +36,10 @@ void Integration::textActionsUpdated() {
void Integration::activationFromTopPanel() {
}
bool Integration::screenIsLocked() {
return false;
}
QString Integration::timeFormat() {
return u"hh:mm"_q;
}

View file

@ -40,6 +40,7 @@ public:
virtual void textActionsUpdated();
virtual void activationFromTopPanel();
[[nodiscard]] virtual bool screenIsLocked();
[[nodiscard]] virtual QString timeFormat();
[[nodiscard]] virtual std::shared_ptr<ClickHandler> createLinkHandler(

View file

@ -189,6 +189,8 @@ bool IsContentVisible(
const auto activeOrNotOverlapped = [&] {
if (const auto active = widget->isActiveWindow()) {
return active;
} else if (Integration::Instance().screenIsLocked()) {
return false;
}
const auto mappedRect = QHighDpi::toNativePixels(