diff --git a/src/surface/layer.cpp b/src/surface/layer.cpp index 97e773e07..76d6932d2 100644 --- a/src/surface/layer.cpp +++ b/src/surface/layer.cpp @@ -137,7 +137,3 @@ Layer::~Layer() noexcept { inline Server& Layer::get_server() const { return server; } - -bool Layer::is_view() const { - return false; -} diff --git a/src/surface/layer.hpp b/src/surface/layer.hpp index 8cb5a5ab5..3ce03f2a8 100644 --- a/src/surface/layer.hpp +++ b/src/surface/layer.hpp @@ -38,7 +38,6 @@ class Layer : public Surface { ~Layer() noexcept; inline Server& get_server() const override; - bool is_view() const override; }; class LayerSubsurface { diff --git a/src/surface/popup.cpp b/src/surface/popup.cpp index bf61591b5..594650add 100644 --- a/src/surface/popup.cpp +++ b/src/surface/popup.cpp @@ -63,7 +63,3 @@ Popup::~Popup() noexcept { constexpr Server& Popup::get_server() const { return server; } - -constexpr bool Popup::is_view() const { - return false; -} diff --git a/src/surface/popup.hpp b/src/surface/popup.hpp index 8270b2ae5..cedbdd053 100644 --- a/src/surface/popup.hpp +++ b/src/surface/popup.hpp @@ -32,7 +32,6 @@ class Popup : public Surface { ~Popup() noexcept; constexpr Server& get_server() const override; - constexpr bool is_view() const override; }; #endif diff --git a/src/surface/surface.hpp b/src/surface/surface.hpp index f43550053..eaa420a3c 100644 --- a/src/surface/surface.hpp +++ b/src/surface/surface.hpp @@ -17,7 +17,9 @@ struct Surface { virtual ~Surface() noexcept {}; virtual constexpr Server& get_server() const = 0; - virtual bool is_view() const = 0; + constexpr bool is_view() const { + return std::is_base_of(); + }; }; #endif diff --git a/src/surface/view.hpp b/src/surface/view.hpp index 3d8119a49..89e044b84 100644 --- a/src/surface/view.hpp +++ b/src/surface/view.hpp @@ -29,9 +29,6 @@ struct View : public Surface { virtual void map() = 0; virtual void unmap() = 0; - constexpr bool is_view() const override { - return true; - } void begin_interactive(const CursorMode mode, const uint32_t edges); void set_position(const int new_x, const int new_y); void set_size(const int new_width, const int new_height);