@@ -1,5 +1,5 @@
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2016-2017 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -89,6 +89,13 @@ class Window : public QObject
90 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* surface READ surface NOTIFY surfaceChanged)
90 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* surface READ surface NOTIFY surfaceChanged)
93+ * @brief Whether to comply to resize requests coming from the client side
95+ * It's true by default
97+ Q_PROPERTY(bool allowClientResize READ allowClientResize WRITE setAllowClientResize NOTIFY allowClientResizeChanged)
93 Window(int id, QObject *parent = nullptr);
100 Window(int id, QObject *parent = nullptr);
94 virtual ~Window();
101 virtual ~Window();
@@ -104,6 +111,9 @@ public:
104 void setSurface(unity::shell::application::MirSurfaceInterface *surface);
111 void setSurface(unity::shell::application::MirSurfaceInterface *surface);
105 void setFocused(bool value);
112 void setFocused(bool value);
114+ bool allowClientResize() const;
115+ void setAllowClientResize(bool);
107 QString toString() const;
117 QString toString() const;
109public Q_SLOTS:
119public Q_SLOTS:
@@ -133,6 +143,7 @@ Q_SIGNALS:
133 void focusedChanged(bool value);
143 void focusedChanged(bool value);
134 void confinesMousePointerChanged(bool value);
144 void confinesMousePointerChanged(bool value);
135 void surfaceChanged(unity::shell::application::MirSurfaceInterface *surface);
145 void surfaceChanged(unity::shell::application::MirSurfaceInterface *surface);
146+ void allowClientResizeChanged(bool value);
138 * @brief Emitted when focus for this window is requested by an external party
149 * @brief Emitted when focus for this window is requested by an external party
@@ -152,6 +163,8 @@ private:
152 Mir::State m_state{Mir::RestoredState};
163 Mir::State m_state{Mir::RestoredState};
153 bool m_stateRequested{false};
164 bool m_stateRequested{false};
154 unity::shell::application::MirSurfaceInterface *m_surface{nullptr};
165 unity::shell::application::MirSurfaceInterface *m_surface{nullptr};
167+ bool m_allowClientResize{true};
157QDebug operator<<(QDebug dbg, const Window *window);
170QDebug operator<<(QDebug dbg, const Window *window);