qml-compositor: Clean up some unnecessary logging.

Change-Id: I1072d6efa059e01d8dcba98c90320bcc242d1c0f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
qml-compositor: Error check loading of WindowChrome.

Change-Id: I76303b8640f013167159d94e8db7d673358c4983
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWaylandWindow: Add a missing shell surface null check.

Caught by tst_QWidget::mapFromAndTo.

Change-Id: I36e08ebfa3bae1ac8667ee828b1762867d71c66d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
qwindow-compositor: Fix null pointer dereference.

setCursorSurface may be invoked with a null surface.
This was exposed by tst_QWidget::destroyBackingStore.

Change-Id: Iac1ef6d2f17e5ee6a693ddbf3875b743bde2ded1
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Remove qPlatformScreenForWindow from header.

Use of this was removed in 02e50ef592f28ec05654acf3f6c9b84d31736269.

Change-Id: I729282bfa9536380fc0d5b2702448cc54a90e37d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWaylandDisplay: Remove unused static.

Change-Id: I868168dee716103962217b5ceb38185090f82e09
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWaylandDisplay: Destroy screens when destroying the display.

Fixes a crash in tst_QApplication.

Change-Id: Ibfc7aded10609cff9c7a20b7193f44d1c73bc893
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QWaylandScreen: Also call QPlatformScreen constructor.

Change-Id: Iae63ea5b15f2422ea28f2f9c8d7abeb30d23c86f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWaylandCompositor: Warn if there are still destroyed surfaces on destruction.

This means there will be no spurious warning on a well written compositor that
cannot be avoided.

Change-Id: Id4405ffe7ba080096547346c0092bedf28a3b196
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
wayland-egl: Logging cleanup.

Prefix warnings with QtCompositor so it's clear where they are coming from.
Remove trailing newlines from messages, they aren't needed.
Also, only warn if something actually goes wrong.

Change-Id: I88b8b03480d938a08a84a4964108d10d86606be6
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Fix warning about use of uninitialized variable

qwaylandwindow.cpp:443:25: warning: ‘transform’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: Ic0a96cfda35d331c9957a527eea7f8b987191b5f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Compile with protected visibility

Change-Id: I64fc922122e407487083c86d2a9617beea32507b
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Partially revert "Error out if dependencies aren't met."

This breaks building from qt.pro in qt5.git when doing integration for the whole
of Qt on CI nodes that don't have wayland installed.

This isn't an optimal solution of course, but it's pragmatic. Maybe it can be
revisited if/when per-module configures are ever a thing.

We reword the warnings to make it clear that QtWayland will not be built under
these circumstances.

This partially reverts commit 5b740c6246e092bc49b029bb7b12b614c4d0ce1e.

Change-Id: I07bd95a3a0349ad37a9025cdf5fd870c348d3799
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Replace signals with Q_SIGNALS.

Fixes tst_headers on QtWayland.

Change-Id: I14ba4a58c257d03d10c63f0413460e2bf52793fc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Make the test client more robust and make valgrind happy

Change-Id: I39ce667123391b946711cc2d16d12799e8b7dd2d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
QWaylandDisplay: Correctly intercept all errors when dispatching.

A connection reset isn't the only form of error we may run into, so make sure we
check for other exceptional circumstances through wl_display_get_error.

This fixes my case of e.g. wl_drm throwing an error but QtWayland never
quitting the client.

Change-Id: I8c76dd7913640e58d03bd2fe52eb054a4daa0235
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWaylandDisplay: Centralize error handling in one place.

Change-Id: Ifba23e349a4006cea501480a7230408f0fafd1b7
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
QWindowCompositor: Getting popups to appear in the right place.

Change-Id: I6ba4731abbf892f8f7bb0a0d5b30bba8082e67be
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Replace custom texture upload with QOpenGLTexture

Change-Id: Ibf6facdd1fba72c2f9741e49cf2c83f9b4136ffc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Avoid allocating and (failing to) manage our own texture cache

There is no reason we should be allocating and managing our own set of
window decorations. This is only going to add to the total texture
memory used and because it is managed as a shared GL resource, it
would have needed some care during cleanup to clean it up correctly.

Change-Id: I19651837da6b3dfde0f78a964982f3f67e577493
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>