@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2016-2017 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -89,6 +89,13 @@ class Window : public QObject
8989 */
9090 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* surface READ surface NOTIFY surfaceChanged)
9191
92+ /**
93+ * @brief Whether to comply to resize requests coming from the client side
94+ *
95+ * It's true by default
96+ */
97+ Q_PROPERTY(bool allowClientResize READ allowClientResize WRITE setAllowClientResize NOTIFY allowClientResizeChanged)
98+
9299public:
93100 Window(int id, QObject *parent = nullptr);
94101 virtual ~Window();
@@ -104,6 +111,9 @@ public:
104111 void setSurface(unity::shell::application::MirSurfaceInterface *surface);
105112 void setFocused(bool value);
106113
114+ bool allowClientResize() const;
115+ void setAllowClientResize(bool);
116+
107117 QString toString() const;
108118
109119public Q_SLOTS:
@@ -133,6 +143,7 @@ Q_SIGNALS:
133143 void focusedChanged(bool value);
134144 void confinesMousePointerChanged(bool value);
135145 void surfaceChanged(unity::shell::application::MirSurfaceInterface *surface);
146+ void allowClientResizeChanged(bool value);
136147
137148 /**
138149 * @brief Emitted when focus for this window is requested by an external party
@@ -152,6 +163,8 @@ private:
152163 Mir::State m_state{Mir::RestoredState};
153164 bool m_stateRequested{false};
154165 unity::shell::application::MirSurfaceInterface *m_surface{nullptr};
166+
167+ bool m_allowClientResize{true};
155168};
156169
157170QDebug operator<<(QDebug dbg, const Window *window);