Move private functions from compton.h to compton.c

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2018-11-03 22:38:18 +00:00
parent 332a873729
commit 796b0e0448
4 changed files with 209 additions and 230 deletions

View File

@ -1194,7 +1194,7 @@ void win_update_bounding_shape(session_t *ps, win *w) {
win_rounded_corners(ps, w);
// Window shape changed, we should free old wpaint and shadow pict
free_wpaint(ps, w);
free_paint(ps, &w->paint);
free_paint(ps, &w->shadow_paint);
//printf_errf("(): free out dated pict");
@ -1265,3 +1265,22 @@ bool win_is_region_ignore_valid(session_t *ps, win *w) {
}
return true;
}
/**
* Stop listening for events on a particular window.
*/
void win_ev_stop(session_t *ps, win *w) {
// Will get BadWindow if the window is destroyed
set_ignore_cookie(ps,
xcb_change_window_attributes(ps->c, w->id, XCB_CW_EVENT_MASK, (const uint32_t[]) { 0 }));
if (w->client_win) {
set_ignore_cookie(ps,
xcb_change_window_attributes(ps->c, w->client_win, XCB_CW_EVENT_MASK, (const uint32_t[]) { 0 }));
}
if (ps->shape_exists) {
set_ignore_cookie(ps,
xcb_shape_select_input(ps->c, w->id, 0));
}
}