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>
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>
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>
Keyboard: Correctly read the xkb locked state

Fixes a typo when reading the xkb states

Change-Id: Ie5acdbcff188049683b503ba8fc8f58c693eb102
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Null check for window on pointer_axis

The window is already destroyed and server doesn't get a message yet.

Change-Id: Ia9dd0ce891a712d1aa913fcb3313a5fe300788ab
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
build fix for MODULE_PLUGINS_TYPE

Change-Id: I8d44f50480440060eba84354e88fb2535e1d8e4a
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Fix QWaylandSurfaceItem to process hover events

setAcceptHoverEvents was set to true but the methods
to handle it werern't implemented

Change-Id: I53719b00eac27b3b903a882fd2aa91fd6a51973e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix popup positioning

The popup coordinates were being stored in an
unused variable and x,y offsets were left unmodified

Change-Id: Idbae7127b65963be6ddbe165d98ac7daa92cac9f
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>