Use current_screen() function in OSD Pretty
This commit is contained in:
@@ -463,11 +463,7 @@ void OSDPretty::mouseMoveEvent(QMouseEvent *e) {
|
|||||||
QPoint new_pos = original_window_pos_ + delta;
|
QPoint new_pos = original_window_pos_ + delta;
|
||||||
|
|
||||||
// Keep it to the bounds of the desktop
|
// Keep it to the bounds of the desktop
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
QScreen *screen = current_screen(e->globalPos());
|
||||||
QScreen *screen = QGuiApplication::screenAt(e->globalPos());
|
|
||||||
#else
|
|
||||||
QScreen *screen = (window() && window()->windowHandle() ? window()->windowHandle()->screen() : nullptr);
|
|
||||||
#endif
|
|
||||||
if (!screen) return;
|
if (!screen) return;
|
||||||
|
|
||||||
QRect geometry = screen->availableGeometry();
|
QRect geometry = screen->availableGeometry();
|
||||||
|
|||||||
Reference in New Issue
Block a user