Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zooming in waveform using scrollwheel is broken #11626

Closed
aareschluchtje opened this issue Jun 4, 2023 · 39 comments
Closed

Zooming in waveform using scrollwheel is broken #11626

aareschluchtje opened this issue Jun 4, 2023 · 39 comments

Comments

@aareschluchtje
Copy link

Bug Description

When using 2.3.5 it was possible to use the scrollwheel to zoom the waveform in and out. I'm unable to do the same in 2.4.0 (the scrollwheel simply doesn't do anything when the mouse is positioned over the waveform). When reinstalling 2.3.5 it was working fine again.

Version

2.4.0

OS

Windows 10

@daschuer
Copy link
Member

daschuer commented Jun 4, 2023

I cannot confirm this with Ubuntu Focal. Is this a windows only thing?

@daschuer daschuer added this to the 2.4.0 milestone Jun 4, 2023
@MarcPlace
Copy link

MarcPlace commented Jun 4, 2023

Can confirm this issue with 2.4.0 (592c0c7) using Gentoo Linux. Scrollwheel doesn't zoom in or out when mouse pointer is positioned inside the waveform. So it seems that not only Windows is affected.

@atskler
Copy link

atskler commented Jun 5, 2023

The issue is also there on openSUSE Tumbleweed.

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 5, 2023

Can also confirm on Fedora 38. bringing @m0dB in the loop. Do you have an idea? Possibly just something you forgot to implement and that none of us spotted while testing #10989?

@ywwg
Copy link
Member

ywwg commented Jun 5, 2023

agree that seems a likely candidate

@m0dB
Copy link
Contributor

m0dB commented Jun 5, 2023

Yeah, just something I missed. I expect this will be easy to implement. I'll have a look (not today though).

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 5, 2023

No worries, take your time. Thank you for taking care of it.

@m0dB
Copy link
Contributor

m0dB commented Jun 9, 2023

On macOS it works fine (tried both with two-fingers on the trackpad and with an external mouse). And looking at the code, I don't see anything that explains this. I forward all events from the openglwindow to the widget...

Maybe I can figure this out if someone with a system where it doesn't work can add some logging and send me the results.

In src/widget/openglwindow.cpp add the following:

At the top of the file:

#include <QDebug>

and as first line of bool OpenGLWindow::event(QEvent* pEv) {

    qDebug() << pEv;

and run with ./mixxx --logLevel debug

@m0dB
Copy link
Contributor

m0dB commented Jun 10, 2023

Ah, and in src/mixxxmainwindow.cpp:

1131 bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
1132     if (event->type() == QEvent::Wheel) {
1133         qDebug() << "MixxxMainWindow::eventFilter" << obj << event;
1134     }
1135 

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 10, 2023

Nevermind I think I built the wrong commit

Log output with your patch

debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollBegin)
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,1), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate, pixelDelta=QPoint(0,0), angleDelta=QPoint(-4,-6))
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollUpdate, delta=-4, orientation=Qt::Horizontal)
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollUpdate)
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter QWidgetWindow(0x340dae0, name = "MixxxMainWindowClassWindow") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter RGBWaveformWidget(0xf8bb158) QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWaveformViewer(0x201b7c40) QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a8670, name = "WaveformBox2") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201a7390, name = "Waveform") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x201b3a00, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e1b30, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d8120, name = "WaveformsContainer") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200d7e50, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200dc970, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WSplitter(0x200a6e30, name = "WaveformSplitter") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetStack(0x200ddcd0, name = "WidgetStack") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x200e03d0, name = "WidgetGroup") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x20025470, name = "SkinContainer") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter WWidgetGroup(0x1d80f4a0, name = "Mixxx") QWheelEvent(Qt::ScrollEnd)
debug [Main] MixxxMainWindow::eventFilter MixxxMainWindow(0x7ffcada7f7e0) QWheelEvent(Qt::ScrollEnd)

@m0dB
Copy link
Contributor

m0dB commented Jun 10, 2023

You only added logging in mixxxmainwindow.cpp, right? Not in openglwindow.cpp

The wheel events are there alright, and with an angleDelta that should definitely have effect here:

void WWaveformViewer::wheelEvent(QWheelEvent* event) {
    if (m_waveformWidget) {
        if (event->angleDelta().y() > 0) {
            onZoomChange(m_waveformWidget->getZoomFactor() / 1.05);
        } else {
            onZoomChange(m_waveformWidget->getZoomFactor() * 1.05);
        }
    }
}

Can you uncomment the qDebug() statements in WWaveformViewer::onZoomChange, WWaveformViewer::setZoom and WaveformWidgetRenderer::setZoom as well? (and while at it, change the text of the first two, they refer to the wrong class).

@Swiftb0y
Copy link
Member

You only added logging in mixxxmainwindow.cpp, right? Not in openglwindow.cpp

Actually I did, but I encountered some other issues that resulted in all non-cpu waveforms to be disabled so I don't think I was able to test properly. Also the issue did not occur, with those waveforms. I'll try investigate whats wrong.

@Swiftb0y
Copy link
Member

Ok, I fixed the issue with the non-cpu waveforms. Forgot to -platform xcb on launch for Wayland.

Patch used to get debug log

diff --git a/src/mixxxmainwindow.cpp b/src/mixxxmainwindow.cpp
index bfaf258bcf..225dde139b 100644
--- a/src/mixxxmainwindow.cpp
+++ b/src/mixxxmainwindow.cpp
@@ -1129,6 +1129,9 @@ bool MixxxMainWindow::loadConfiguredSkin() {
 }
 
 bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
+    if (event->type() == QEvent::Wheel) {
+        qDebug() << "MixxxMainWindow::eventFilter" << obj << event;
+    }
     if (event->type() == QEvent::ToolTip) {
         // always show tooltips in the preferences window
         QWidget* activeWindow = QApplication::activeWindow();
diff --git a/src/waveform/renderers/waveformwidgetrenderer.cpp b/src/waveform/renderers/waveformwidgetrenderer.cpp
index 1b3d618cba..95849730c1 100644
--- a/src/waveform/renderers/waveformwidgetrenderer.cpp
+++ b/src/waveform/renderers/waveformwidgetrenderer.cpp
@@ -387,7 +387,7 @@ void WaveformWidgetRenderer::setup(
 }
 
 void WaveformWidgetRenderer::setZoom(double zoom) {
-    //qDebug() << "WaveformWidgetRenderer::setZoom" << zoom;
+    qDebug() << "WaveformWidgetRenderer::setZoom" << zoom;
     m_zoomFactor = math_clamp<double>(zoom, s_waveformMinZoom, s_waveformMaxZoom);
 }
 
diff --git a/src/widget/openglwindow.cpp b/src/widget/openglwindow.cpp
index 74d40eeb4b..92175579e6 100644
--- a/src/widget/openglwindow.cpp
+++ b/src/widget/openglwindow.cpp
@@ -2,6 +2,7 @@
 
 #include <QApplication>
 #include <QResizeEvent>
+#include <QDebug>
 
 #include "moc_openglwindow.cpp"
 #include "widget/tooltipqopengl.h"
@@ -62,6 +63,7 @@ bool OpenGLWindow::event(QEvent* pEv) {
     // gets called recursive, potentially resulting in infinite recursion
     // and a stack overflow. The boolean m_handlingEvent protects against
     // this recursion.
+    qDebug() << pEv;
     const auto t = pEv->type();
 
     bool result = QOpenGLWindow::event(pEv);
diff --git a/src/widget/wwaveformviewer.cpp b/src/widget/wwaveformviewer.cpp
index 93c5f9d6e9..090bcb00a5 100644
--- a/src/widget/wwaveformviewer.cpp
+++ b/src/widget/wwaveformviewer.cpp
@@ -227,14 +227,14 @@ void WWaveformViewer::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOld
 }
 
 void WWaveformViewer::onZoomChange(double zoom) {
-    //qDebug() << "WaveformWidgetRenderer::onZoomChange" << this << zoom;
+    qDebug() << "WWaveformViewer::onZoomChange" << this << zoom;
     setZoom(zoom);
     // notify back the factory to sync zoom if needed
     WaveformWidgetFactory::instance()->notifyZoomChange(this);
 }
 
 void WWaveformViewer::setZoom(double zoom) {
-    //qDebug() << "WaveformWidgetRenderer::setZoom" << zoom;
+    qDebug() << "WWaveformViewer::setZoom" << zoom;
     if (m_waveformWidget) {
         m_waveformWidget->setZoom(zoom);
     }

Debug log

debug [Main] QEnterEvent(QPoint(130,113))
debug [Main] QMouseEvent(MouseMove, localPos=132,110, screenPos=485,428)
debug [Main] QMouseEvent(MouseMove, localPos=132,109, screenPos=485,427)
debug [Main] QMouseEvent(MouseMove, localPos=133,109, screenPos=486,427)
debug [Main] QMouseEvent(MouseMove, localPos=133,108, screenPos=486,426)
debug [Main] QMouseEvent(MouseMove, localPos=134,107, screenPos=487,425)
debug [Main] QMouseEvent(MouseMove, localPos=134,106, screenPos=487,424)
debug [Main] QMouseEvent(MouseMove, localPos=135,105, screenPos=488,423)
debug [Main] QMouseEvent(MouseMove, localPos=135,104, screenPos=488,422)
debug [Main] QMouseEvent(MouseMove, localPos=136,104, screenPos=489,422)
debug [Main] QMouseEvent(MouseMove, localPos=136,103, screenPos=489,421)
debug [Main] QMouseEvent(MouseMove, localPos=140,97, screenPos=493,415)
debug [Main] QMouseEvent(MouseMove, localPos=141,97, screenPos=494,415)
debug [Main] QMouseEvent(MouseMove, localPos=141,96, screenPos=494,414)
debug [Main] QMouseEvent(MouseMove, localPos=141,95, screenPos=494,413)
debug [Main] QMouseEvent(MouseMove, localPos=142,95, screenPos=495,413)
debug [Main] QMouseEvent(MouseMove, localPos=142,94, screenPos=495,412)
debug [Main] QMouseEvent(MouseMove, localPos=142,93, screenPos=495,411)
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))
debug [Main] MixxxMainWindow::eventFilter OpenGLWindow(0x15f64950) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,1))
debug [Main] QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,1))
debug [Main] MixxxMainWindow::eventFilter allshader::RGBWaveformWidget(0x13461370) QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,1))
debug [Main] QMouseEvent(MouseMove, localPos=141,94, screenPos=494,412)
debug [Main] QMouseEvent(MouseMove, localPos=141,95, screenPos=494,413)
debug [Main] QMouseEvent(MouseMove, localPos=141,96, screenPos=494,414)
debug [Main] QMouseEvent(MouseMove, localPos=141,97, screenPos=494,415)
debug [Main] QMouseEvent(MouseMove, localPos=141,98, screenPos=494,416)
debug [Main] QMouseEvent(MouseMove, localPos=141,99, screenPos=494,417)
debug [Main] QMouseEvent(MouseMove, localPos=141,100, screenPos=494,418)
debug [Main] QMouseEvent(MouseMove, localPos=141,101, screenPos=494,419)
debug [Main] QMouseEvent(MouseMove, localPos=141,106, screenPos=494,424)
debug [Main] QEvent(Leave, 0x7ffd0bbd7c10)

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

Thanks @Swiftb0y

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

@Swiftb0y (or anyone with the issue), can you try this patch:

diff --git a/src/widget/wglwidgetqopengl.cpp b/src/widget/wglwidgetqopengl.cpp
index 25a4a6ef2a..2a9bb736df 100644
--- a/src/widget/wglwidgetqopengl.cpp
+++ b/src/widget/wglwidgetqopengl.cpp
@@ -54,6 +54,10 @@ void WGLWidget::resizeEvent(QResizeEvent* event) {
     QWidget::resizeEvent(event);
 }
 
+void WGLWidget::wheelEvent(QWheelEvent* event) {
+    event->ignore();
+}
+
 bool WGLWidget::isContextValid() const {
     return m_pOpenGLWindow && m_pOpenGLWindow->context() && m_pOpenGLWindow->context()->isValid();
 }
diff --git a/src/widget/wglwidgetqopengl.h b/src/widget/wglwidgetqopengl.h
index 78b4cd48e8..2dec72c7c5 100644
--- a/src/widget/wglwidgetqopengl.h
+++ b/src/widget/wglwidgetqopengl.h
@@ -41,6 +41,7 @@ class WGLWidget : public QWidget {
   protected:
     void showEvent(QShowEvent* event) override;
     void resizeEvent(QResizeEvent* event) override;
+    void wheelEvent(QWheelEvent* event) override;
 
     QPaintDevice* paintDevice();
 

@MarcPlace
Copy link

MarcPlace commented Jun 11, 2023

Did a quick test with this patch applied to 5e06563 (2.4 branch), unfortunately with no luck. It looks like only GL/GLSL based waveforms are affected... if I try a different one without GL (like RGB or HSV for example), the scrollwheel works as expected (with significant more CPU consumption, of course).

@Swiftb0y
Copy link
Member

yep, can confirm the same.

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

Urgh... Ok, final attempt. Please test with any of the allshader waveform types. If this still doesn't work, I will install one of the reported linux distros to debug this.

diff --git a/src/waveform/widgets/allshader/waveformwidget.cpp b/src/waveform/widgets/allshader/waveformwidget.cpp
index 37d67addaa..76e38834a5 100644
--- a/src/waveform/widgets/allshader/waveformwidget.cpp
+++ b/src/waveform/widgets/allshader/waveformwidget.cpp
@@ -1,5 +1,7 @@
 #include "waveform/widgets/allshader/waveformwidget.h"
 
+#include <QApplication>
+
 #include "moc_waveformwidget.cpp"
 #include "waveform/renderers/allshader/waveformrendererabstract.h"
 
@@ -52,3 +54,8 @@ void WaveformWidget::resizeGL(int w, int h) {
         renderer->allshaderWaveformRenderer()->resizeGL(w, h);
     }
 }
+
+void WaveformWidget::wheelEvent(QWheelEvent* event) {
+    QApplication::sendEvent(parentWidget(), event);
+    event->accept();
+}
diff --git a/src/waveform/widgets/allshader/waveformwidget.h b/src/waveform/widgets/allshader/waveformwidget.h
index 656df91998..b55ef35cd9 100644
--- a/src/waveform/widgets/allshader/waveformwidget.h
+++ b/src/waveform/widgets/allshader/waveformwidget.h
@@ -24,6 +24,6 @@ class allshader::WaveformWidget : public ::WGLWidget,
     virtual WGLWidget* getGLWidget() override {
         return this;
     }
-
   private:
+    void wheelEvent(QWheelEvent* event) override;
 };
diff --git a/src/widget/wwaveformviewer.cpp b/src/widget/wwaveformviewer.cpp
index 93c5f9d6e9..a9ae7a65ba 100644
--- a/src/widget/wwaveformviewer.cpp
+++ b/src/widget/wwaveformviewer.cpp
@@ -187,7 +187,7 @@ void WWaveformViewer::wheelEvent(QWheelEvent* event) {
     if (m_waveformWidget) {
         if (event->angleDelta().y() > 0) {
             onZoomChange(m_waveformWidget->getZoomFactor() / 1.05);
-        } else {
+        } else if (event->angleDelta().y() < 0) {
             onZoomChange(m_waveformWidget->getZoomFactor() * 1.05);
         }
     }

@ywwg
Copy link
Member

ywwg commented Jun 11, 2023

That diff does not fix the issue for me on Ubuntu :/

@ywwg
Copy link
Member

ywwg commented Jun 11, 2023

If I add a wheelevent handler to glsl waveform widget directly it works. I will work up a patch

ywwg added a commit to ywwg/mixxx that referenced this issue Jun 11, 2023
@ywwg
Copy link
Member

ywwg commented Jun 11, 2023

#11645

@ywwg
Copy link
Member

ywwg commented Jun 11, 2023

Did a quick test with this patch applied to 5e06563 (2.4 branch), unfortunately with no luck. It looks like only GL/GLSL based waveforms are affected... if I try a different one without GL (like RGB or HSV for example), the scrollwheel works as expected (with significant more CPU consumption, of course).

weird, this change definitely fixed it for me... I tried all of the waveform types. @MarcPlace @Swiftb0y Can you add a qDebug() statement to WGLWidget::wheelEvent to see if it's getting called?

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

@ywwg I don't see how adding the wheelEvent handler to WGLWidget (your fix 11645) instead of to the derived allshader::WaveformWidget::wheelEvent(QWheelEvent* event) (my "final attempt" patch) can make a difference. Are you 100% sure you applied the patch and that you tried with one of the allshader waveform types?

The problem I have with your fix 11645 is that it adds code that is very specific for the waveform widgets to the generic WGLWidget. I would really prefer to see this handled in the waveform widget class instead (in which case it should also be added to GLWaveformWidgetAbstract btw)

@Swiftb0y
Copy link
Member

Did a quick test with this patch applied to 5e06563 (2.4 branch), unfortunately with no luck. It looks like only GL/GLSL based waveforms are affected... if I try a different one without GL (like RGB or HSV for example), the scrollwheel works as expected (with significant more CPU consumption, of course).

weird, this change definitely fixed it for me... I tried all of the waveform types. @MarcPlace @Swiftb0y Can you add a qDebug() statement to WGLWidget::wheelEvent to see if it's getting called?

Yes, its definitely getting called debug [Main] WGLWidget::wheelEvent: QWheelEvent(Qt::NoScrollPhase, pixelDelta=QPoint(0,0), angleDelta=QPoint(0,6))

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

@Swiftb0y but did you try with my "final attempt" patch or with @ywwg 's #11645 ?

@Swiftb0y
Copy link
Member

I missed the final attempt one. Sorry for the confusion. Give me a second.

@Swiftb0y
Copy link
Member

Good news, your "final attempt" patch also works. #11645 also works, but I can't judge the quality of either patches.

@m0dB
Copy link
Contributor

m0dB commented Jun 11, 2023

Great. @ywwg can you please try again with the wheelEvent override in the waveform widget class?

@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

adding it to the allshaders/waveformwidget file fixes the issue for those, but zoom is not working for the waveforms I use, rgb (glsl). That's why I thought it better to apply the fix farther upstream.

@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

generic WGLWidget

ah yes I see what you mean -- we don't want to zoom in on spinnies :)

@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

yeah putting the fix in glwaveformwidgetabstract fixes it for the glsl waveforms, but not the allshaders ones -- so probably this fix needs to go in more than one place, which seems fine.

ywwg added a commit to ywwg/mixxx that referenced this issue Jun 12, 2023
@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

sorry, had to create a new PR. I am getting a little lost with all the different objects! please let me know if I've got it wrong again :)

@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

#11650

@m0dB
Copy link
Contributor

m0dB commented Jun 12, 2023

Yes, this looks good, thanks!

On a sidenote and out of curiosity, any particular reason you prefer RGB (glsl) over RGB (allshaders) (glsl) or RGB L/R (allshaders) (glsl) ?

@Swiftb0y
Copy link
Member

Thank you very much for digging into this 👍

@ywwg
Copy link
Member

ywwg commented Jun 12, 2023

I just like the way it looks more haha

@m0dB
Copy link
Contributor

m0dB commented Jun 12, 2023

Fair enough :-)

I would make sense (and be trivial) to add an allshaders version of the original RGB (glsl) (which is not so much about using glsl but more about using a texture to transfer the waveform data and do the conversion of waveform data to colored line values in the shader instead of in the CPU), which would combine the original RGB (glsl) code for the actual waveform with the allshaders code for all the overlays.

@MarcPlace
Copy link

Can confirm that #11650 did the trick also for me. Works perfect now on all waveforms. Thank you. 👍

@aareschluchtje
Copy link
Author

Also for me it's fixed now on Windows 10. Thanks all of you in this thread for the help! 😄

ywwg added a commit to ywwg/mixxx that referenced this issue Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants