mirror of https://github.com/procxx/kepka.git
Beta version 1.9.10: Fix build for OS X 10.10-10.11.
This commit is contained in:
parent
cc71bdce8f
commit
ffeff09561
|
@ -45,7 +45,14 @@ constexpr auto kMsInSecond = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] QRect ScreenFromPosition(QPoint point) {
|
[[nodiscard]] QRect ScreenFromPosition(QPoint point) {
|
||||||
const auto screen = QGuiApplication::screenAt(point);
|
const auto screen = [&]() -> QScreen* {
|
||||||
|
for (const auto screen : QGuiApplication::screens()) {
|
||||||
|
if (screen->virtualGeometry().contains(point)) {dD
|
||||||
|
return screen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}();
|
||||||
const auto use = screen ? screen : QGuiApplication::primaryScreen();
|
const auto use = screen ? screen : QGuiApplication::primaryScreen();
|
||||||
return use
|
return use
|
||||||
? use->availableGeometry()
|
? use->availableGeometry()
|
||||||
|
|
Loading…
Reference in New Issue