summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay_p.h
diff options
context:
space:
mode:
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-03-26 10:16:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-09 11:44:30 +0200
commit768484daaa64bea965bef981a16f59be8db0c190 (patch)
tree0e65a8d37f340a4dcdd1f3eb10f4245afba9e35a /src/client/qwaylanddisplay_p.h
parentc2a22eea6716e073875474adf624d8463eba836c (diff)
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>
Diffstat (limited to 'src/client/qwaylanddisplay_p.h')
-rw-r--r--src/client/qwaylanddisplay_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 40cb2b2c5..cf5dfc21d 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -51,6 +51,7 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
+#include <QtWaylandClient/private/qwayland-xdg-shell.h>
struct wl_cursor_image;
@@ -78,6 +79,7 @@ namespace QtWayland {
class qt_sub_surface_extension;
class qt_surface_extension;
class wl_text_input_manager;
+ class xdg_shell;
}
typedef void (*RegistryListener)(void *data,
@@ -113,6 +115,7 @@ public:
QtWayland::wl_compositor *compositor() { return &mCompositor; }
QtWayland::wl_shell *shell() { return mShell.data(); }
+ QtWayland::xdg_shell *shellXdg() { return mShellXdg.data(); }
QList<QWaylandInputDevice *> inputDevices() const { return mInputDevices; }
QWaylandInputDevice *defaultInputDevice() const;
@@ -168,6 +171,7 @@ private:
QThread *mEventThread;
QWaylandEventThread *mEventThreadObject;
QScopedPointer<QtWayland::wl_shell> mShell;
+ QScopedPointer<QtWayland::xdg_shell> mShellXdg;
QList<QPlatformScreen *> mScreens;
QList<QWaylandInputDevice *> mInputDevices;
QList<Listener> mRegistryListeners;