diff options
author | David Faure <[email protected]> | 2024-08-27 19:41:53 +0200 |
---|---|---|
committer | David Faure <[email protected]> | 2024-08-30 18:39:36 +0200 |
commit | 40bde8a572bd8ed039d3f5a5ab99b281de7410bd (patch) | |
tree | d40d767b6238bfa36f2062dd283d2a7980729a8a /src/widgets/kernel/qapplication.cpp | |
parent | 2a10a679a17de2f2ec83f676198936fcaaaa8fad (diff) |
QWidgetWindow: fix enter/leave events not sent due to fractional scaling
If widget A starts at y=0 and widget B starts at y=19, when the mouse
moves from y=15 to y=18.6667, the code was doing childAt(p) with a
rounded QPoint y=19 and finding B, but then the relative coord for B
was set to -0.33333 so B wasn't under the mouse and didn't get an enter
event (and since it's now the "last receiver", it doesn't get one later
either when y is bigger).
Add QWidget::childAt(QPointF) to fix this.
Fixes: QTBUG-128391
Pick-to: 6.8
Change-Id: I76d4b711a8297648780bdd079eb67405ab12be14
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 5e1d7923197..89d451589a8 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2253,8 +2253,8 @@ bool QApplicationPrivate::modalState() /* \internal */ -QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint &windowPos, - QPoint *pos, QEvent::Type type, +QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPointF &windowPos, + QPointF *pos, QEvent::Type type, Qt::MouseButtons buttons, QWidget *buttonDown, QWidget *alienWidget) { |