diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -556,9 +556,7 @@ shellSurface->setTitle(origTitle); auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(c); - QEXPECT_FAIL("", "BUG 323798", Continue); QVERIFY(c->caption() != origTitle); - QEXPECT_FAIL("", "BUG 323798", Continue); QCOMPARE(c->caption(), origTitle.simplified()); } diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -111,9 +111,7 @@ Client *client = windowCreatedSpy.first().first().value(); QVERIFY(client); QCOMPARE(client->window(), w); - QEXPECT_FAIL("", "BUG 323798", Continue); QVERIFY(client->caption() != QString::fromUtf8(origTitle)); - QEXPECT_FAIL("", "BUG 323798", Continue); QCOMPARE(client->caption(), QString::fromUtf8(origTitle).simplified()); // and destroy the window again diff --git a/client.cpp b/client.cpp --- a/client.cpp +++ b/client.cpp @@ -1417,9 +1417,9 @@ QString Client::readName() const { if (info->name() && info->name()[0] != '\0') - return QString::fromUtf8(info->name()); + return QString::fromUtf8(info->name()).simplified(); else - return KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_NAME); + return KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_NAME).simplified(); } // The list is taken from http://www.unicode.org/reports/tr9/ (#154840) diff --git a/shell_client.cpp b/shell_client.cpp --- a/shell_client.cpp +++ b/shell_client.cpp @@ -90,12 +90,12 @@ template void ShellClient::initSurface(T *shellSurface) { - m_caption = shellSurface->title(); + m_caption = shellSurface->title().simplified(); connect(shellSurface, &T::titleChanged, this, &ShellClient::captionChanged); connect(shellSurface, &T::destroyed, this, &ShellClient::destroyClient); connect(shellSurface, &T::titleChanged, this, [this] (const QString &s) { - m_caption = s; + m_caption = s.simplified(); emit captionChanged(); } );