diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 50816ec..c25d7df 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -86,8 +86,11 @@ int main(int argc, char *argv[]) QObject::connect(&setupDelay, &QTimer::timeout, []() { setupScreens(); + QTimer::singleShot(1000, []() { + setupScreens(); + }); }); - setupDelay.setInterval(100); + setupDelay.setInterval(300); setupDelay.setSingleShot(true); setupDelay.start(); @@ -119,7 +122,10 @@ int main(int argc, char *argv[]) static void watch(const QScreen *scrn) { - QObject::connect(scrn, &QScreen::geometryChanged, [](const QRect &geom) { + QObject::connect(scrn, &QScreen::geometryChanged, [](const QRect &) { + setupDelay.start(); + }); + QObject::connect(scrn, &QScreen::virtualGeometryChanged, [](const QRect &) { setupDelay.start(); }); } |