Change the minimum required Wayland version back to 1.2

As discussed, Wayland 1.3 is not common in distributions yet, and
that is a problem for the C.I. machines.

Change-Id: Iec5c6d8ae1d1a50199f66d45ca9269694db78efe
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Dont use a separate mapped state of QWaylandSurfaceItem

Use the isMapped value of the QWaylandSurface

Change-Id: I7a44fa2d8d58f698cd6994e8bc8c8acf86a57775
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Create the egl windows and context with the right config

The egl config should be calculated when creating the window, and
the format of it should be set accordingly. The format of the window
and the one of the context will then match if using the same format
as input.

Change-Id: Ie93735171d8945111a450263089e192919249b68
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Make QtWayland::Compositor subclass the generated wl_compositor class

Change-Id: If07c7ca86ef87f503e1e79663beb9b4ddbafd739
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Support changing the keymap

This adds new API, but does not add a way for the user to set the
keymap. That should be implemented in the compositors.

Change-Id: I28ee7d372f8f578c0d7efb9223cabce49504be1f
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Updated required version

Change-Id: I0284bcac551c13d3f8a7e71c00f0f68cd7872f08
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix build break

Remove the removed argument from the EGL platform context constructor.

Change-Id: I6203d07c356f7191a698d8d5bc958923cbdc2d96
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Remove the buffer queue.

A client calling attach(A);commit();attach(B);commit() should result
in its back buffer be set to B, and A be discarded.
If the client wants to have a queue it should keep it client side or
a protocol extension tailored for that purpose should be developed.

Change-Id: Ia0048f311504d85821df9f5b9225887801efec71
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Make sure the frame callbacks are sent at the right time

When there is a rendering thread, like with QtQuick compositors,
there is a race condition where the frame callbacks are sent before
the last buffer the client sent is released.
Assume the following scenario:
attach(B1)/frame(F1)/commit()...frame started...attach(B2)/frame(F2)/
commit()...frame finished.
On frame finished the callback just installed is emitted before the
buffer B2 is being used and B1 released. That forces the client to
allocate a third buffer to draw the next frame.
Now, do not send out the frame callbacks until a new frame started.
The successive draw will release B1, use the new B2 and than send out F2.

Change-Id: I5743c7baf9fdd3cde28c5f594ff646c06abb74b7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Compile ServerBuffer client example on desktop gl

Change-Id: I8efbda3e5266c5668b2461429a21d900e2ecd175
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fixup for GLX integration

Change-Id: I2de94481f7d3e109fdce7ca961f8969299cf5d9e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Take advantage of the Qt 5 plugin json structure

Also change naming scheme of plugins:
buffer integrations doesn't start with "wayland-" but the platform
plugins have to start with "wayland-".

Also update the README

Change-Id: I6dd2103ab287ed569ab06cfb6eb469e3db058831
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Flush the clients connection after sending the frame callbacks

We want to make sure the events reach the clients asap.

Change-Id: I0783c6be4f4412fd5f3665faec1e57d141291ce7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Make the compositor redraw when a surface gets a commit().

It must redraw, even if it doesn't actually redraw anything, irrespective
of the fact that a attach/damage has come or not. Just calling frame();commit()
is perfectly valid.

Change-Id: If298654b8a7cb7c954cfbad8618f23134731cb9f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Fix NPOT decoration texture binding

If the context does not support the NPOTTextureRepeat (i.e. GL_OES_texture_npot extension), wrapping must be set to CLAMP_TO_EDGE to prevent invalid texture mapping.

Change-Id: I3ededccc14a32188986529c14fa91161fb383cfc
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Remove the QWidget compositor example

The QWidget API isn't well fit for a Wayland compositor, and does
not have any advantage over a QWindow, which can also draw using
QPainter. Besides the current implementation doesn't work properly,
and no one seems to be interested in fixing it.

Change-Id: Id1c337506af48e1d1fdd8d14f0ed637d299702f3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Add a note that qmake CONFIG+= only works in a clean tree

You need to use qmake -r on a tree which already has Makefiles. But you
probably need to clean up anyway in order to get the new functionality, so
this is a good recommendation for the general case.

Change-Id: Ie0fa10621a3fe961945da10a72e7fcc632f3fc0f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Merge branch 'stable' into dev

Conflicts:
	src/compositor/compositor_api/qwaylandsurfaceitem.cpp
	src/compositor/wayland_wrapper/qwlcompositor.cpp

Change-Id: Ibbed140c7694ea7fd1882ebb0139b376546b8b50
Add a libhybris hardwareintegrations to share EGL server buffers

Add a hardwareintegration plugin to make Qt server side EGL buffers
shareable from the compositor to the client, such as what the
server-buffer example does.

Change-Id: I24558324d51202ca449b47b0ee395c8e81c10698
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
qwlkeyboard: fix non-xkb-build

Change-Id: I16912ee54b88f7af69f20c330c2e45084c82ea61
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>