diff --git a/client.cpp b/client.cpp index 3fa87594dd..7277b33c0b 100644 --- a/client.cpp +++ b/client.cpp @@ -86,7 +86,7 @@ bool Client::s_haveResizeEffect = false; */ Client::Client() : Toplevel() - , m_client(XCB_WINDOW_NONE) + , m_client() , m_wrapper() , decoration(NULL) , bridge(new Bridge(this)) @@ -297,7 +297,7 @@ void Client::releaseWindow(bool on_shutdown) else // Make sure it's not mapped if the app unmapped it (#65279). The app // may do map+unmap before we initially map the window by calling rawShow() from manage(). xcb_unmap_window(connection(), m_client); - m_client = XCB_WINDOW_NONE; + m_client.reset(); m_wrapper.reset(); XDestroyWindow(display(), frameId()); //frame = None; @@ -338,7 +338,7 @@ void Client::destroyClient() destroyDecoration(); cleanGrouping(); workspace()->removeClient(this); - m_client = XCB_WINDOW_NONE; // invalidate + m_client.reset(); // invalidate m_wrapper.reset(); XDestroyWindow(display(), frameId()); //frame = None; diff --git a/client.h b/client.h index aff8de6230..5b94a2d35d 100644 --- a/client.h +++ b/client.h @@ -829,7 +829,7 @@ private: bool tabTo(Client *other, bool behind, bool activate); - xcb_window_t m_client; + Xcb::Window m_client; Xcb::Window m_wrapper; KDecoration* decoration; Bridge* bridge; diff --git a/manage.cpp b/manage.cpp index 0904ede8af..2fb6603204 100644 --- a/manage.cpp +++ b/manage.cpp @@ -631,7 +631,7 @@ void Client::embedClient(xcb_window_t w, const XWindowAttributes& attr) assert(m_client == XCB_WINDOW_NONE); assert(frameId() == XCB_WINDOW_NONE); assert(m_wrapper == XCB_WINDOW_NONE); - m_client = w; + m_client.reset(w, false); const xcb_visualid_t visualid = XVisualIDFromVisual(attr.visual); const uint32_t zero_value = 0;