From 093e56ff05c212e92fd8de2b41b839f3762e6d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 17 Feb 2016 14:41:26 +0100 Subject: [PATCH] Move decoration double click logic to button press Complements ed1d32288b50647469fb0e000f21b849e286ca36 for Wayland. --- abstract_client.cpp | 4 ++-- autotests/wayland/decoration_input_test.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 0242152cb9..dc145c4dee 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1445,8 +1445,8 @@ bool AbstractClient::processDecorationButtonPress(QMouseEvent *event, bool ignor void AbstractClient::processDecorationButtonRelease(QMouseEvent *event) { if (isDecorated()) { - if (!event->isAccepted() && decoration()->titleBar().contains(event->pos()) && event->button() == Qt::LeftButton) { - m_decoration.doubleClickTimer.start(); + if (event->isAccepted() || !decoration()->titleBar().contains(event->pos())) { + invalidateDecorationDoubleClickTimer(); // click was for the deco and shall not init a doubleclick } } diff --git a/autotests/wayland/decoration_input_test.cpp b/autotests/wayland/decoration_input_test.cpp index 300edc2834..ec31d5f78b 100644 --- a/autotests/wayland/decoration_input_test.cpp +++ b/autotests/wayland/decoration_input_test.cpp @@ -283,11 +283,9 @@ void KWin::DecorationInputTest::testDoubleClick() // double click again PRESS; RELEASE; - QEXPECT_FAIL("", "Tripple click triggers another double click", Continue); QVERIFY(c->isOnAllDesktops()); PRESS; RELEASE; - QEXPECT_FAIL("", "Tripple click triggers another double click", Continue); QVERIFY(!c->isOnAllDesktops()); }