Use Xcb::Window wrapper class for Client::m_client

Now we can use the wrapper for the client which we manage.
This commit is contained in:
Martin Gräßlin 2013-09-10 07:27:39 +02:00
parent 577525c2bb
commit c1483f41d4
3 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;