From 3d5178a7c6b9aa1a17b4d76f07aba4c48dd201e0 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Thu, 22 Feb 2018 07:26:39 +0100 Subject: [PATCH 1/4] SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- effects/slide/slide_config.desktop | 1 + scripts/minimizeall/metadata.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/effects/slide/slide_config.desktop b/effects/slide/slide_config.desktop index ca9154159f..f4cdb582ae 100644 --- a/effects/slide/slide_config.desktop +++ b/effects/slide/slide_config.desktop @@ -48,6 +48,7 @@ Name[nn]=Skliding Name[pa]=ਸਲਾਈਡ Name[pl]=Slajd Name[pt]=Deslizar +Name[pt_BR]=Deslizar Name[ro]=Alunecă Name[ru]=Прокрутка Name[si]=ලිස්සන්න diff --git a/scripts/minimizeall/metadata.desktop b/scripts/minimizeall/metadata.desktop index 03bdc5418f..37f1919184 100644 --- a/scripts/minimizeall/metadata.desktop +++ b/scripts/minimizeall/metadata.desktop @@ -55,6 +55,7 @@ Comment[nl]=Voegt een sneltoets toe om alle vensters te minimaliseren en te hers Comment[nn]=Legg til snarvegar for å minimera og gjenoppretta alle vindauge Comment[pl]=Dodaje skrót do zminimalizowania i przywracania wszystkich okien Comment[pt]=Adiciona um atalho para minimizar ou repor todas as janelas +Comment[pt_BR]=Adiciona um atalho para minimizar e restaurar todas as janelas Comment[sl]=Doda bližnjico za skrčenje ali povečanje vseh oken Comment[sr]=Додаје пречицу за минимизовање и обнављање свих прозора Comment[sr@ijekavian]=Додаје пречицу за минимизовање и обнављање свих прозора From 4c6e7b9200cfa97d7a17d7b0dee2442877cc254c Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Sun, 25 Feb 2018 07:18:47 +0100 Subject: [PATCH 2/4] SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- kcmkwin/kwincompositing/kwineffect.knsrc | 2 +- kcmkwin/kwinscripts/kwinscripts.knsrc | 2 +- kcmkwin/kwintabbox/kwinswitcher.knsrc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwincompositing/kwineffect.knsrc b/kcmkwin/kwincompositing/kwineffect.knsrc index 4d80e93e77..c60d424b4b 100644 --- a/kcmkwin/kwincompositing/kwineffect.knsrc +++ b/kcmkwin/kwincompositing/kwineffect.knsrc @@ -9,7 +9,7 @@ Name[el]=Εφέ διαχειριστή παραθύρων Name[en_GB]=Window Manager Effects Name[es]=Efectos del gestor de ventanas Name[eu]=Leiho kudeatzailearen efektua -Name[fi]=Ikkunaohjelman tehosteet +Name[fi]=Ikkunointiohjelman tehosteet Name[fr]=Effets du gestionnaire de fenêtres Name[gl]=Efectos do xestor de xanelas Name[he]=אפקטי מנהל חלונות diff --git a/kcmkwin/kwinscripts/kwinscripts.knsrc b/kcmkwin/kwinscripts/kwinscripts.knsrc index 3ef48b41e6..ccc8bfadfe 100644 --- a/kcmkwin/kwinscripts/kwinscripts.knsrc +++ b/kcmkwin/kwinscripts/kwinscripts.knsrc @@ -9,7 +9,7 @@ Name[el]=Σενάρια διαχειριστή παραθύρων Name[en_GB]=Window Manager Scripts Name[es]=Guiones del gestor de ventanas Name[eu]=Leiho kudeatzailearen scriptak -Name[fi]=Ikkunaohjelman skriptit +Name[fi]=Ikkunointiohjelman skriptit Name[fr]=Scripts du gestionnaire de fenêtres Name[gl]=Scripts do xestor de xanelas Name[hu]=Ablakkezelő szkriptek diff --git a/kcmkwin/kwintabbox/kwinswitcher.knsrc b/kcmkwin/kwintabbox/kwinswitcher.knsrc index 2b2cc34d24..97018f5204 100644 --- a/kcmkwin/kwintabbox/kwinswitcher.knsrc +++ b/kcmkwin/kwintabbox/kwinswitcher.knsrc @@ -9,7 +9,7 @@ Name[el]=Διατάξεις εναλλαγής διαχειριστή παραθ Name[en_GB]=Window Manager Switching Layouts Name[es]=Esquemas de cambio del gestor de ventanas Name[eu]=Leiho kudeatzailearen aldatzeko-antolamenduak -Name[fi]=Ikkunaohjelman vaihdon asettelut +Name[fi]=Ikkunointiohjelman vaihdon asettelut Name[fr]=Changement de disposition du gestionnaire de fenêtres Name[gl]=Disposicións de cambio do xestor de xanelas Name[he]=מחליף פריסות של מנהל החלונות From 5795fc8cc04a422194e06d20fb395cbbf3ea2ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 4 Feb 2018 14:19:23 +0100 Subject: [PATCH 3/4] Init the icon in ShellClient::init Summary: If the window never provides the appId, we would not get an icon for the window. This happens for example for KWin's internal windows which don't set the app id as KWin also doesn't have a desktop file. With this change the DebugConsole has a window icon in the decoration. Test Plan: Extended tests and manual verification of DebugConsole Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10294 --- autotests/integration/internal_window.cpp | 1 + autotests/integration/shell_client_test.cpp | 1 + shell_client.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index f67da3faaa..9a2407c8ba 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -211,6 +211,7 @@ void InternalWindowTest::testEnterLeave() QVERIFY(!workspace()->activeClient()); ShellClient *c = clientAddedSpy.first().first().value(); QVERIFY(c->isInternal()); + QCOMPARE(c->icon().name(), QStringLiteral("wayland")); QCOMPARE(workspace()->findToplevel(&win), c); QCOMPARE(c->geometry(), QRect(0, 0, 100, 100)); QVERIFY(c->isShown(false)); diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index adfe9bb532..46d0f80089 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -160,6 +160,7 @@ void TestShellClient::testMapUnmapMap() QCOMPARE(client->readyForPainting(), true); QCOMPARE(client->depth(), 32); QVERIFY(client->hasAlpha()); + QCOMPARE(client->icon().name(), QStringLiteral("wayland")); QCOMPARE(workspace()->activeClient(), client); QVERIFY(effectsWindowShownSpy.isEmpty()); QVERIFY(client->isMaximizable()); diff --git a/shell_client.cpp b/shell_client.cpp index 6df6814bb9..38099594e0 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -197,6 +197,7 @@ void ShellClient::init() findInternalWindow(); createWindowId(); setupCompositing(); + updateIcon(); SurfaceInterface *s = surface(); Q_ASSERT(s); if (s->buffer()) { From 911176a887be639a1e123a3c633fb05870fda33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 4 Feb 2018 21:21:54 +0100 Subject: [PATCH 4/4] Send hoverLeave or hoverMotion after touch up on decoration Summary: On touch down a first hover motion is sent to the decoration. Thus e.g. a button enters the hovered state. On touch release so far the decoration did not get a leave event resulting in the button still being hovered. This change ensures the leave event is sent or if the pointer is also on the decoration a motion to the pointer position is sent. BUG: 386231 FIXED-IN: 5.12.3 Test Plan: New test case and manual testing to verify that the maximize button is no longer hovered after touch down/up on it Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10308 --- .../integration/decoration_input_test.cpp | 77 +++++++++++++++++++ autotests/integration/quick_tiling_test.cpp | 2 +- input.cpp | 10 +++ 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index 85d22e243e..e15c716e6a 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -76,6 +76,8 @@ private Q_SLOTS: void testModifierClickUnrestrictedMove(); void testModifierScrollOpacity_data(); void testModifierScrollOpacity(); + void testTouchEvents_data(); + void testTouchEvents(); private: AbstractClient *showWindow(Test::ShellSurfaceType type); @@ -757,6 +759,81 @@ void DecorationInputTest::testModifierScrollOpacity() } } +void DecorationInputTest::testTouchEvents_data() +{ + QTest::addColumn("type"); + + QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell; + QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5; + QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6; +} + +class EventHelper : public QObject +{ + Q_OBJECT +public: + EventHelper() : QObject() {} + ~EventHelper() override = default; + + bool eventFilter(QObject *watched, QEvent *event) override + { + Q_UNUSED(watched) + if (event->type() == QEvent::HoverMove) { + emit hoverMove(); + } else if (event->type() == QEvent::HoverLeave) { + emit hoverLeave(); + } + return false; + } + +Q_SIGNALS: + void hoverMove(); + void hoverLeave(); +}; + +void DecorationInputTest::testTouchEvents() +{ + // this test verifies that the decoration gets a hover leave event on touch release + // see BUG 386231 + QFETCH(Test::ShellSurfaceType, type); + AbstractClient *c = showWindow(type); + QVERIFY(c); + QVERIFY(c->isDecorated()); + QVERIFY(!c->noBorder()); + + EventHelper helper; + c->decoration()->installEventFilter(&helper); + QSignalSpy hoverMoveSpy(&helper, &EventHelper::hoverMove); + QVERIFY(hoverMoveSpy.isValid()); + QSignalSpy hoverLeaveSpy(&helper, &EventHelper::hoverLeave); + QVERIFY(hoverLeaveSpy.isValid()); + + quint32 timestamp = 1; + const QPoint tapPoint(c->geometry().center().x(), c->clientPos().y() / 2); + + QVERIFY(!input()->touch()->decoration()); + kwinApp()->platform()->touchDown(0, tapPoint, timestamp++); + QVERIFY(input()->touch()->decoration()); + QCOMPARE(input()->touch()->decoration()->decoration(), c->decoration()); + QCOMPARE(hoverMoveSpy.count(), 1); + QCOMPARE(hoverLeaveSpy.count(), 0); + kwinApp()->platform()->touchUp(0, timestamp++); + QCOMPARE(hoverMoveSpy.count(), 1); + QCOMPARE(hoverLeaveSpy.count(), 1); + + QCOMPARE(c->isMove(), false); + + // let's check that a hover motion is sent if the pointer is on deco, when touch release + Cursor::setPos(tapPoint); + QCOMPARE(hoverMoveSpy.count(), 2); + kwinApp()->platform()->touchDown(0, tapPoint, timestamp++); + QCOMPARE(hoverMoveSpy.count(), 3); + QCOMPARE(hoverLeaveSpy.count(), 1); + kwinApp()->platform()->touchUp(0, timestamp++); + QCOMPARE(hoverMoveSpy.count(), 4); + QCOMPARE(hoverLeaveSpy.count(), 1); +} + } WAYLANDTEST_MAIN(KWin::DecorationInputTest) diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index d3c5ea9827..20a7ed9bc7 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -560,7 +560,7 @@ void QuickTilingTest::testQuickTilingTouchMoveXdgShell() QCOMPARE(quickTileChangedSpy.count(), 1); QTEST(c->quickTileMode(), "expectedMode"); QVERIFY(configureRequestedSpy.wait()); - QCOMPARE(configureRequestedSpy.count(), 5); + QTRY_COMPARE(configureRequestedSpy.count(), 5); QCOMPARE(false, configureRequestedSpy.last().first().toSize().isEmpty()); } diff --git a/input.cpp b/input.cpp index 7e6d520c05..bd12702eab 100644 --- a/input.cpp +++ b/input.cpp @@ -1130,6 +1130,16 @@ public: e.setAccepted(false); QCoreApplication::sendEvent(decoration->decoration(), &e); decoration->client()->processDecorationButtonRelease(&e); + if (input()->pointer()->decoration() == decoration) { + // send motion to current pointer position + const QPointF p = input()->pointer()->pos() - decoration->client()->pos(); + QHoverEvent event(QEvent::HoverMove, p, p); + QCoreApplication::instance()->sendEvent(decoration->decoration(), &event); + } else { + // send leave + QHoverEvent event(QEvent::HoverLeave, QPointF(), QPointF()); + QCoreApplication::instance()->sendEvent(decoration->decoration(), &event); + } } m_lastGlobalTouchPos = QPointF();