diff --git a/include/x11/connection.hpp b/include/x11/connection.hpp index 792a8319..f83cdc89 100644 --- a/include/x11/connection.hpp +++ b/include/x11/connection.hpp @@ -35,9 +35,9 @@ namespace detail { public: template explicit connection_base(Args&&... args) - : xpp::core::core(forward(args)...) + : xpp::core(forward(args)...) , interfaces, Extensions...>(*this) - , Extensions(static_cast(*this))... + , Extensions(m_c.get())... , Extensions::error_dispatcher(static_cast(*this).get())... { m_root_window = screen_of_display(default_screen())->root; } @@ -48,10 +48,6 @@ namespace detail { return o; } - virtual operator xcb_connection_t*() const { - return *static_cast(*this); - } - void operator()(const shared_ptr& error) const { check(error); } @@ -110,7 +106,7 @@ class connection : public detail::connection_base - explicit connection(Args&&... args) : base_type::connection_base(forward(args)...) {} + explicit connection(Args&&... args) : base_type(forward(args)...) {} const connection& operator=(const connection& o) { return o;