diff options
author | Martin Gräßlin <mgraesslin@kde.org> | 2016-10-11 13:06:51 +0200 |
---|---|---|
committer | Martin Gräßlin <mgraesslin@kde.org> | 2016-10-11 13:39:13 +0000 |
commit | acd10cd393abe04a8fd6fe3ab14055e09c85bc15 (patch) | |
tree | 45fbccd37bbb8180a01ac06e6ef518945bca2445 | |
parent | fcaa38c84dc92ec951c43e1759d7a46080755cbc (diff) | |
download | qtwayland-acd10cd393abe04a8fd6fe3ab14055e09c85bc15.tar.gz |
Call formatWindowTitle on the window title
According to QWidget::setWindowTitle documentation the QPA plugin is
responsible for adding the application name to the window title.
As it's supposed to be done for Unix platform the Wayland QPA also needs
to perform this task.
Task-number: QTBUG-56475
Change-Id: Ib261c68d08ca06d1ec4734c8c215a4ceb059fae3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
-rw-r--r-- | src/client/qwaylandwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index eb9c1409..aa7b5781 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -137,7 +137,7 @@ void QWaylandWindow::initWindow() if (mShellSurface) { // Set initial surface title - mShellSurface->setTitle(window()->title()); + setWindowTitle(window()->title()); // The appId is the desktop entry identifier that should follow the // reverse DNS convention (see http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html). @@ -258,7 +258,8 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent) void QWaylandWindow::setWindowTitle(const QString &title) { if (mShellSurface) { - mShellSurface->setTitle(title); + const QString separator = QString::fromUtf8(" \xe2\x80\x94 "); // unicode character U+2014, EM DASH + mShellSurface->setTitle(formatWindowTitle(title, separator)); } if (mWindowDecoration && window()->isVisible()) |