[nox11] backport of https://qt.gitorious.org/qt/qtwayland/commit/10700eb...

...19191879caf41bc188dca807b68a4146c