From fedabb417604ceeae1f30e486f2142bb407a1411 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 5 Nov 2012 19:15:42 +0100 Subject: Rework Window creation, avoid using the same window in multiple clients --- src/buffer.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/buffer.hh') diff --git a/src/buffer.hh b/src/buffer.hh index d955bb14..f38de731 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -143,8 +143,11 @@ public: const String& name() const { return m_name; } - Window* get_or_create_window(); - void delete_window(Window* window); + // Window handling + using WindowList = std::vector>; + const WindowList& windows() const { return m_windows; } + Window& new_window(); + void delete_window(Window& window); // returns true if the buffer is in a different state than // the last time it was saved @@ -216,7 +219,7 @@ private: void apply_modification(const Modification& modification); void revert_modification(const Modification& modification); - std::list> m_windows; + WindowList m_windows; size_t m_last_save_undo_index; size_t m_timestamp; -- cgit v1.2.3