diff --git a/client.cpp b/client.cpp index 23900e2653..266116eeb6 100644 --- a/client.cpp +++ b/client.cpp @@ -525,14 +525,6 @@ void Client::createDecoration(const QRect& oldgeom) dontMoveResize(); } ); - connect(m_decoration, &KDecoration2::Decoration::titleBarWheelEvent, this, - [this](const QPoint &angleDelta) { - if (angleDelta.y() == 0) { - return; - } - performMouseCommand(options->operationTitlebarMouseWheel(angleDelta.y()), Cursor::pos()); - } - ); connect(m_decoration, &KDecoration2::Decoration::resizeOnlyBordersChanged, this, &Client::updateInputWindow); connect(m_decoration, &KDecoration2::Decoration::bordersChanged, this, [this]() { diff --git a/events.cpp b/events.cpp index 24794d87a2..eac8f73d92 100644 --- a/events.cpp +++ b/events.cpp @@ -1200,7 +1200,13 @@ bool Client::buttonPressEvent(xcb_window_t w, int button, int state, int x, int hor ? Qt::Horizontal : Qt::Vertical, x11ToQtMouseButtons(state), modifiers); + event.setAccepted(false); QCoreApplication::sendEvent(m_decoration, &event); + if (!event.isAccepted() && !hor) { + if (m_decoration->titleBar().contains(x, y)) { + performMouseCommand(options->operationTitlebarMouseWheel(delta), QPoint(x_root, y_root)); + } + } } else { QMouseEvent event(QEvent::MouseButtonPress, QPointF(x, y), QPointF(x_root, y_root), x11ToQtMouseButton(button), x11ToQtMouseButtons(state), x11ToQtKeyboardModifiers(state));