Fix build after QEGLPlatformContext API change

Change-Id: I7f2a72ad1430d48f54565b3996b61260756f3edf
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Show the correct function name when makeCurrent fails

Change-Id: I0fb0dcdf9d9691bbda602a7cf6cd04ce2e094769
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Fix resizing of shm apps

Change-Id: Iad94691317bde38603d9143f951b1b69326ab12e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Don't create an invalidated surface when not needed

After invalidateSurface() is called we don't want to recreate
the EGLSurface on setGeometry() until makeCurrent is called

Change-Id: Ide10ecf3bff40a01fa1ed249986a631c77c2bf63
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Avoid virtual calls in constructors.

QWaylandWindow::setGeometry() is a virtual call and internally it
would call windowType() which is pure virtual, so calling it from
the constructor won't work.

Instead, set geometry explicitly from the constructor and call
setGeometry() on setVisible(true). This also merges it so we send
one expose event (with correct x/y offset) on geometry change + show.

Change-Id: I1d21664c982005c60c8d73740e43b3a463bac4a8
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Fix glx_xcomposite build after change in QtPlatformSupport

The API was changed by qtbase's af1e32426c50694c0e4c1c292aa5eeee3b38c7bc

Change-Id: I38ec8f1be5f5ffb4b93097ce4e72c9a61c9459d0
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Disable headers precompilation

qtbase's cb09e1e enables precompiled headers by default.
Unfortunately qmake tries to precompile them as C headers
as a dependency of the .c protocol files we have, failing
the build.
Quick and easy solution: disable them alltogether.

Change-Id: I96a4f4fd1fe0d3a83bb990408f1f3994650d96c5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add xdg-shell protocol file version 1.4.0

Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.4.0

This file will need to be refreshed on protocol update
until xdg-shell land in wayland's public headers

Task-number: QTBUG-38633/part/1of2
Change-Id: I397d863dcfc2223ac6eb234c37dbcd7449eced58
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Add minimize feature to QWindow using wayland's xdg-shell

The feature is disabled by default,
and can be enabled at runtime
by exporting QT_WAYLAND_USE_XDG_SHELL env variable.

This patch relies on presence of protocol file
which has been imported from weston-1.4.0 sources,
until the xdg-shell is merge into wayland itself.

Because xdg-shell is experimental,
code fallback to WaylandShell if no XdgShell
but keep in mind those shells are exclusive.

Since xdg-shell and wayland-shell share most of the API,
some factorization is done by an (empty) abstraction class
to keep the code more readable.

Despite xdg-shell introduces new popups concept,
they're not used on this change for maitainance purpose.

Notes:

* This change depends on presence of xdg-shell protocol file.

* You can check a demo video
  (qt-tizen-cinematic-experience-20140430-rzr)
  of the test case at :
  https://www.youtube.com/watch?v=pY_XXvKc_0E#

* Use Super+Tab to show window again if hidden

Task-number: QTBUG-38633/part/2of2
Change-Id: I2d7ed85bea1847d82439fdfc893a3dbb2581c14a
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Fix generated code for interface names not starting with qt_ or wl_

The generated code for an interface without a qt_ or wl_ prefix was
broken, and could not compile.
This commit needs a 'make clean' to let qtwaylandscanner run again.

Change-Id: Id9c7e3f87385f83eeffd1e8718c854a405f411f0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Export the QWaylandSurfaceItem class

Change-Id: Ic2f100d0dca34411f603dd9fc27ad58f59f05cbc
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix unsetting the shell surface on deletion

Change-Id: I700975ae4f1ef5156406e8b0d7655abf960aba06
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Fix crash when deleting ShellSurface objects

We must not leave dangling wl_resource objects with their
user data pointing to a deleted object.

Change-Id: I54aa7f03bc7542fdea144dd0af8da7f600b4d21c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reduce headers inter-dependency in the QPA plugin

Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fix wrong fetching of the y-inverted value

Change-Id: I027f8c78f652bae2659fdb82541bc24f54a0a070
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
ignore: emacs backup files

Change-Id: Ib1159d42134a58a3e9e91306e58a63a4216b3494
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
xdg-shell: upgrade to support current version (weston-1.5.0)

The protocol file is a raw copy of

Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.5.0

Task-number: QTBUG-38633/related
Change-Id: I41ca2f89c09a8b6348ce2fbf6d59f44b4c8134df
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Philippe Coval <rzr@gna.org>
Allow for the creation of surface-less QWaylandSurfaceItems

The compositors may want to have server-side only views.

Change-Id: I682b352660d1ecbf0c757b4bee9d0482cfc88006
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Have more guards against mis-use of surfaceless QWaylandSurfaceItems

Change-Id: Ib380076e46b7d70442381be3328a240d81c77110
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Delete data device manager while display is still alive.

Change-Id: I7691e06d75866034c93020ebdfb45421275fcf9d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>