From 1db3dee9432f28f35ec9c971444b8a889bbdd6e2 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 5 Aug 2016 10:59:51 +0200 Subject: Client: Refactor window active state Let shell surface implementations decide if they manage activated state. Moves the logic out of QWaylandDisplay. Change-Id: I75c86df68a1a93f9b1d2bf378b6603215d0b0128 Reviewed-by: Paul Olav Tvete --- src/client/qwaylandxdgsurface_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client/qwaylandxdgsurface_p.h') diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h index e367980b7..bc72820a1 100644 --- a/src/client/qwaylandxdgsurface_p.h +++ b/src/client/qwaylandxdgsurface_p.h @@ -89,6 +89,8 @@ public: void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE; void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE; + bool shellManagesActiveState() const Q_DECL_OVERRIDE { return true; } + bool isFullscreen() const { return m_fullscreen; } bool isMaximized() const { return m_maximized; } -- cgit v1.2.3 From b3b4778c237c43cfde02c4750017c37112c315c4 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 5 Aug 2016 10:10:58 +0200 Subject: Make wl_shell and xdg_shell use the QWaylandShellIntegration interface This simplifies the code in QWaylandDisplay and hopefully makes it easier to implement a prioritized shell selection mechanism later. Change-Id: I2bb3a13f8acedb60a6606cb3a8b5b228095eadf9 Reviewed-by: Giulio Camuffo --- src/client/qwaylandxdgsurface_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/qwaylandxdgsurface_p.h') diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h index bc72820a1..51c658ea4 100644 --- a/src/client/qwaylandxdgsurface_p.h +++ b/src/client/qwaylandxdgsurface_p.h @@ -63,13 +63,14 @@ namespace QtWaylandClient { class QWaylandWindow; class QWaylandInputDevice; class QWaylandExtendedSurface; +class QWaylandXdgShell; class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurface : public QWaylandShellSurface , public QtWayland::xdg_surface { Q_OBJECT public: - QWaylandXdgSurface(struct ::xdg_surface *shell_surface, QWaylandWindow *window); + QWaylandXdgSurface(QWaylandXdgShell *shell, QWaylandWindow *window); virtual ~QWaylandXdgSurface(); using QtWayland::xdg_surface::resize; @@ -105,6 +106,7 @@ private: private: QWaylandWindow *m_window; + QWaylandXdgShell* m_shell; bool m_maximized; bool m_minimized; bool m_fullscreen; -- cgit v1.2.3