Add deleteProperty() method to Xcb::Window
Calls xcb_delete_property on the managed window with the passed in xcb_atom_t.
This commit is contained in:
parent
48f32b3bca
commit
e3a1cc0b5d
2 changed files with 15 additions and 5 deletions
10
client.cpp
10
client.cpp
|
@ -285,9 +285,9 @@ void Client::releaseWindow(bool on_shutdown)
|
|||
} else
|
||||
untab();
|
||||
xcb_connection_t *c = connection();
|
||||
xcb_delete_property(c, m_client, atoms->kde_net_wm_user_creation_time);
|
||||
xcb_delete_property(c, m_client, atoms->net_frame_extents);
|
||||
xcb_delete_property(c, m_client, atoms->kde_net_wm_frame_strut);
|
||||
m_client.deleteProperty(atoms->kde_net_wm_user_creation_time);
|
||||
m_client.deleteProperty(atoms->net_frame_extents);
|
||||
m_client.deleteProperty(atoms->kde_net_wm_frame_strut);
|
||||
m_client.reparent(rootWindow(), x(), y());
|
||||
xcb_change_save_set(c, XCB_SET_MODE_DELETE, m_client);
|
||||
m_client.selectInput(XCB_EVENT_MASK_NO_EVENT);
|
||||
|
@ -1108,7 +1108,7 @@ void Client::exportMappingState(int s)
|
|||
assert(m_client != XCB_WINDOW_NONE);
|
||||
assert(!deleting || s == WithdrawnState);
|
||||
if (s == WithdrawnState) {
|
||||
XDeleteProperty(display(), window(), atoms->wm_state);
|
||||
m_client.deleteProperty(atoms->wm_state);
|
||||
return;
|
||||
}
|
||||
assert(s == NormalState || s == IconicState);
|
||||
|
@ -1906,7 +1906,7 @@ void Client::setTabGroup(TabGroup *group)
|
|||
PropModeReplace, (unsigned char*)(&data), 1);
|
||||
}
|
||||
else
|
||||
XDeleteProperty(display(), window(), atoms->kde_net_wm_tab_group);
|
||||
m_client.deleteProperty(atoms->kde_net_wm_tab_group);
|
||||
emit tabGroupChanged();
|
||||
}
|
||||
|
||||
|
|
10
xcbutils.h
10
xcbutils.h
|
@ -436,6 +436,7 @@ public:
|
|||
void map();
|
||||
void unmap();
|
||||
void reparent(xcb_window_t parent, int x = 0, int y = 0);
|
||||
void deleteProperty(xcb_atom_t property);
|
||||
/**
|
||||
* Clears the window area. Same as xcb_clear_area with x, y, width, height being @c 0.
|
||||
**/
|
||||
|
@ -623,6 +624,15 @@ void Window::reparent(xcb_window_t parent, int x, int y)
|
|||
xcb_reparent_window(connection(), m_window, parent, x, y);
|
||||
}
|
||||
|
||||
inline
|
||||
void Window::deleteProperty(xcb_atom_t property)
|
||||
{
|
||||
if (!isValid()) {
|
||||
return;
|
||||
}
|
||||
xcb_delete_property(connection(), m_window, property);
|
||||
}
|
||||
|
||||
inline
|
||||
void Window::clear()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue