mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-29 00:30:01 +01:00
Use current_screen() function in OSD Pretty
This commit is contained in:
parent
7f39a38d6c
commit
5a5f50e1e4
@ -463,11 +463,7 @@ void OSDPretty::mouseMoveEvent(QMouseEvent *e) {
|
||||
QPoint new_pos = original_window_pos_ + delta;
|
||||
|
||||
// Keep it to the bounds of the desktop
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QScreen *screen = QGuiApplication::screenAt(e->globalPos());
|
||||
#else
|
||||
QScreen *screen = (window() && window()->windowHandle() ? window()->windowHandle()->screen() : nullptr);
|
||||
#endif
|
||||
QScreen *screen = current_screen(e->globalPos());
|
||||
if (!screen) return;
|
||||
|
||||
QRect geometry = screen->availableGeometry();
|
||||
|
Loading…
x
Reference in New Issue
Block a user