Don't set the window title for a Qt::Desktop window (QDesktopWidget)

The desktop doesn't belong to this application, we shouldn't be setting
it (assuming it is even possible). On X, for example, it's possible to
set the name and you end up with the root window having _NET_WM_NAME
pointing to the last application that created a QDesktopWidget.

Change-Id: Ib62d0a4d56a4d2a74afc6b33fa607867343e7aba
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
Thiago Macieira 2014-04-29 13:22:10 -07:00 committed by The Qt Project
parent bdcd86c03e
commit 2567b35a5e

View File

@ -743,7 +743,7 @@ void QWindow::setTitle(const QString &title)
d->windowTitle = title;
changed = true;
}
if (d->platformWindow)
if (d->platformWindow && type() != Qt::Desktop)
d->platformWindow->setWindowTitle(title);
if (changed)
emit windowTitleChanged(title);