From 111df19ac2ee09e2389784f573127a2a296580d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 19 Oct 2023 04:19:52 +0200 Subject: [PATCH] Fix Mouse.FullDelta computation. [GB.QT4] * BUG: Fix Mouse.FullDelta computation. [GB.QT5] * BUG: Fix Mouse.FullDelta computation. --- gb.qt4/src/CWidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gb.qt4/src/CWidget.cpp b/gb.qt4/src/CWidget.cpp index fb8c5461f..685817626 100644 --- a/gb.qt4/src/CWidget.cpp +++ b/gb.qt4/src/CWidget.cpp @@ -3115,6 +3115,12 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) eat_wheel = control->flag.wheel; + if (control != MOUSE_wheel_on_control) + { + MOUSE_wheel_on_control = control; + MOUSE_delta_x = MOUSE_delta_y = 0; + } + __MOUSE_WHEEL_TRY_PROXY: //fprintf(stderr, "wheel on %p %s\n", control, control->name); @@ -3149,12 +3155,6 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) MOUSE_info.state = ev->buttons(); MOUSE_info.modifier = ev->modifiers(); - if (control != MOUSE_wheel_on_control) - { - MOUSE_wheel_on_control = control; - MOUSE_delta_x = MOUSE_delta_y = 0; - } - #ifdef QT5 QPoint delta = ev->angleDelta(); if (delta.x())