Move decoration double click logic to button press

Complements ed1d32288b for Wayland.
This commit is contained in:
Martin Gräßlin 2016-02-17 14:41:26 +01:00
parent cc8b3a5a96
commit 093e56ff05
2 changed files with 2 additions and 4 deletions

View file

@ -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
}
}

View file

@ -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());
}