diff options
author | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-03-26 10:16:01 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-09 11:44:30 +0200 |
commit | 768484daaa64bea965bef981a16f59be8db0c190 (patch) | |
tree | 0e65a8d37f340a4dcdd1f3eb10f4245afba9e35a /src/client/qwaylandshellsurface_p.h | |
parent | c2a22eea6716e073875474adf624d8463eba836c (diff) | |
download | qtwayland-768484daaa64bea965bef981a16f59be8db0c190.tar.gz |
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/qwaylandshellsurface_p.h')
-rw-r--r-- | src/client/qwaylandshellsurface_p.h | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h index 2477c3f0..2f59f60c 100644 --- a/src/client/qwaylandshellsurface_p.h +++ b/src/client/qwaylandshellsurface_p.h @@ -55,39 +55,25 @@ class QWaylandWindow; class QWaylandInputDevice; class QWindow; -class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface : public QtWayland::wl_shell_surface +class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface { public: - QWaylandShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window); - ~QWaylandShellSurface(); + virtual ~QWaylandShellSurface() {} + virtual void resize(QWaylandInputDevice * /*inputDevice*/, enum wl_shell_surface_resize /*edges*/) + {} - using QtWayland::wl_shell_surface::resize; - void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges); - - using QtWayland::wl_shell_surface::move; - void move(QWaylandInputDevice *inputDevice); + virtual void move(QWaylandInputDevice * /*inputDevice*/) {} + virtual void setTitle(const QString & /*title*/) {} + virtual void setAppId(const QString & /*appId*/) {} private: - void setMaximized(); - void setFullscreen(); - void setNormal(); - void setMinimized(); - - void setTopLevel(); - void updateTransientParent(QWindow *parent); - void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial); - - QWaylandWindow *m_window; - bool m_maximized; - bool m_fullscreen; - QSize m_size; - - void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; - void shell_surface_configure(uint32_t edges, - int32_t width, - int32_t height) Q_DECL_OVERRIDE; - void shell_surface_popup_done() Q_DECL_OVERRIDE; + virtual void setMaximized() {} + virtual void setFullscreen() {} + virtual void setNormal() {} + virtual void setMinimized() {} + virtual void setTopLevel() {} + virtual void updateTransientParent(QWindow * /*parent*/) {} friend class QWaylandWindow; }; |