From df31866b5a1661ce15401afacf2ee58ae9f5d5d4 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 21 Jul 2023 13:15:44 +0200 Subject: c++,window: Implemented missing functionality --- c++/window/xcb.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'c++') diff --git a/c++/window/xcb.cpp b/c++/window/xcb.cpp index 0a27643..cd0e77c 100644 --- a/c++/window/xcb.cpp +++ b/c++/window/xcb.cpp @@ -218,21 +218,29 @@ window::window(device& dev_, xcb_window_ xcb_colormap_{xcb_colormap_}, video_mode_{vid_mode_}, window_title_{title_view_} -{ - // TODO -} +{} window::~window(){ - // TODO + device_.window_destroyed(xcb_window_); + xcb_destroy_window(device_.xcb_connection, xcb_window_); + device_.flush(); } void window::show(){ - // TODO + assert(device_.xcb_connection); + xcb_map_window(device_.xcb_connection, xcb_window_); } void window::hide(){ - // TODO + assert(device_.xcb_connection); + xcb_unmap_window(device_.xcb_connection, xcb_window_); +} + +const video_mode& window