add xcb_set_window_rect which configures a window according to a Rect
This commit is contained in:
15
src/xcb.c
15
src/xcb.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* i3 - an improved dynamic tiling window manager
|
||||
*
|
||||
* © 2009 Michael Stapelberg and contributors
|
||||
* © 2009-2010 Michael Stapelberg and contributors
|
||||
*
|
||||
* See file LICENSE for license information.
|
||||
*
|
||||
@ -375,3 +375,16 @@ int predict_text_width(xcb_connection_t *conn, const char *font_pattern, char *t
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
/*
|
||||
* Configures the given window to have the size/position specified by given rect
|
||||
*
|
||||
*/
|
||||
void xcb_set_window_rect(xcb_connection_t *conn, xcb_window_t window, Rect r) {
|
||||
xcb_configure_window(conn, window,
|
||||
XCB_CONFIG_WINDOW_X |
|
||||
XCB_CONFIG_WINDOW_Y |
|
||||
XCB_CONFIG_WINDOW_WIDTH |
|
||||
XCB_CONFIG_WINDOW_HEIGHT,
|
||||
&(r.x));
|
||||
}
|
||||
|
Reference in New Issue
Block a user