forked from github_mirror/framelesshelper
Fix object detection with dual screen
This commit is contained in:
parent
c302bf331c
commit
bf2c085519
|
@ -1828,14 +1828,17 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
|
||||||
dpr)
|
dpr)
|
||||||
: true;
|
: true;
|
||||||
#if defined(QT_WIDGETS_LIB) || defined(QT_QUICK_LIB)
|
#if defined(QT_WIDGETS_LIB) || defined(QT_QUICK_LIB)
|
||||||
const bool isInIgnoreObjects = isInSpecificObjects(globalMouse.x,
|
// For this purpose, QCursor give more accurate position
|
||||||
globalMouse.y,
|
// than windows when using several monitors.
|
||||||
|
const auto qtGlobalMousePos = QCursor::pos() * dpr;
|
||||||
|
const bool isInIgnoreObjects = isInSpecificObjects(qtGlobalMousePos.x(),
|
||||||
|
qtGlobalMousePos.y(),
|
||||||
data->ignoreObjects,
|
data->ignoreObjects,
|
||||||
dpr);
|
dpr);
|
||||||
const bool customDragObjects = !data->draggableObjects.isEmpty();
|
const bool customDragObjects = !data->draggableObjects.isEmpty();
|
||||||
const bool isInDraggableObjects = customDragObjects
|
const bool isInDraggableObjects = customDragObjects
|
||||||
? isInSpecificObjects(globalMouse.x,
|
? isInSpecificObjects(qtGlobalMousePos.x(),
|
||||||
globalMouse.y,
|
qtGlobalMousePos.y(),
|
||||||
data->draggableObjects,
|
data->draggableObjects,
|
||||||
dpr)
|
dpr)
|
||||||
: true;
|
: true;
|
||||||
|
|
Loading…
Reference in New Issue