Merge pull request #10346 from Gobbel2000/zoom_fix
Fix #324840: Ctrl+Scrollwheel zoom on Linux X11
This commit is contained in:
commit
5788c24755
1 changed files with 9 additions and 0 deletions
|
@ -398,6 +398,15 @@ void NotationViewInputController::wheelEvent(QWheelEvent* event)
|
|||
qreal stepsX = 0.0;
|
||||
qreal stepsY = 0.0;
|
||||
|
||||
// pixelDelta is unreliable on X11
|
||||
#ifdef Q_OS_LINUX
|
||||
if (std::getenv("WAYLAND_DISPLAY") == NULL) {
|
||||
// Ignore pixelsScrolled unless Wayland is used
|
||||
pixelsScrolled.setX(0);
|
||||
pixelsScrolled.setY(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!pixelsScrolled.isNull()) {
|
||||
dx = pixelsScrolled.x();
|
||||
dy = pixelsScrolled.y();
|
||||
|
|
Loading…
Reference in a new issue