libwm

library for X windows manipulations
git clone git://z3bra.org/libwm
Log | Files | Refs | LICENSE

commit ae47478c1ce914b39c17eba1928d210e2a9c15a3
parent fb8de7fca9de329eb47a4e540992e341557a206a
Author: dcat <dcat@iotek.org>
Date:   Sun Nov 22 03:10:24 2015

wm_set_override()

Diffstat:
 README.md |  1 +
 libwm.c   | 10 ++++++++++
 wm.h      |  6 ++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -20,6 +20,7 @@ Here is the full list of all the function you can use from `libwm`: wm_set_border(width, color, wid); wm_set_focus(wid); wm_set_cursor(x, y, mode); + wm_set_override(wid, mode); wm_teleport(wid, w, h, x, y); wm_move(wid, mode, x, y); wm_remap(wid, mode); diff --git a/libwm.c b/libwm.c @@ -284,6 +284,16 @@ wm_move(xcb_window_t wid, int mode, int x, int y) return 1; } +void +wm_set_override(xcb_window_t w, int or) +{ + uint32_t mask = XCB_CW_OVERRIDE_REDIRECT; + uint32_t val[] = { or }; + + xcb_change_window_attributes(conn, w, mask, val); +} + + int wm_remap(xcb_window_t wid, int mode) { diff --git a/wm.h b/wm.h @@ -149,6 +149,12 @@ int wm_set_focus(xcb_window_t wid); int wm_set_cursor(int x, int y, int mode); /* + * set override_redirect on window + * args: wid, {0,1} + */ +void wm_set_override(xcb_window_t, int); + +/* * Teleport a window to the given position. */ int wm_teleport(xcb_window_t wid, int w, int h, int x, int y);