mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Move _monitorRect and _monitorLastGot to psDesktopRect method
This commit is contained in:
parent
eee3049fdd
commit
e04598835b
3 changed files with 6 additions and 21 deletions
|
@ -947,14 +947,9 @@ Window::ControlsLayout WindowControlsLayout() {
|
|||
|
||||
} // namespace Platform
|
||||
|
||||
namespace {
|
||||
|
||||
QRect _monitorRect;
|
||||
auto _monitorLastGot = 0LL;
|
||||
|
||||
} // namespace
|
||||
|
||||
QRect psDesktopRect() {
|
||||
static QRect _monitorRect;
|
||||
static auto _monitorLastGot = 0LL;
|
||||
auto tnow = crl::now();
|
||||
if (tnow > _monitorLastGot + 1000LL || tnow < _monitorLastGot) {
|
||||
_monitorLastGot = tnow;
|
||||
|
|
|
@ -36,14 +36,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <mach-o/dyld.h>
|
||||
#include <AVFoundation/AVFoundation.h>
|
||||
|
||||
namespace {
|
||||
|
||||
QRect _monitorRect;
|
||||
crl::time _monitorLastGot = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
QRect psDesktopRect() {
|
||||
static QRect _monitorRect;
|
||||
static crl::time _monitorLastGot = 0;
|
||||
auto tnow = crl::now();
|
||||
if (tnow > _monitorLastGot + 1000 || tnow < _monitorLastGot) {
|
||||
_monitorLastGot = tnow;
|
||||
|
|
|
@ -145,14 +145,9 @@ void psDoCleanup() {
|
|||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
QRect _monitorRect;
|
||||
crl::time _monitorLastGot = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
QRect psDesktopRect() {
|
||||
static QRect _monitorRect;
|
||||
static crl::time _monitorLastGot = 0;
|
||||
auto tnow = crl::now();
|
||||
if (tnow > _monitorLastGot + 1000LL || tnow < _monitorLastGot) {
|
||||
_monitorLastGot = tnow;
|
||||
|
|
Loading…
Add table
Reference in a new issue