Add the xcb_connection_t to session_t

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Uli Schlachter
2018-10-03 15:27:48 +02:00
committed by Yuxuan Shui
parent 54807342f4
commit 37ef9c5b8a
7 changed files with 159 additions and 196 deletions

12
src/x.h
View File

@ -24,6 +24,18 @@ typedef struct winprop winprop_t;
r; \
})
/**
* Send a request to X server and get the reply to make sure all previous
* requests are processed, and their replies received
*
* xcb_get_input_focus is used here because it is the same request used by
* libX11
*/
static inline void
x_sync(xcb_connection_t *c) {
free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL));
}
/**
* Get a specific attribute of a window.
*