Fix bug #613

Merge branch 5.4 from https://gitorious.org/qt/qtwayland.git
Signed-off-by: Nikolay Nizov <nizovn@gmail.com>