tFlush pending requests synchronously - wmutils - X windows manipulation utilities
(HTM) git clone git://z3bra.org/wmutils
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit dd268ecacc773aa6f767f8d3e6653b2a71f25c4e
(DIR) parent 49d23aee42268d593e40b86a102fdc3d920c29e5
(HTM) Author: z3bra <contactatz3bradotorg>
Date: Wed, 25 Jan 2017 14:19:03 +0100
Flush pending requests synchronously
xcb_flush() forces flushing requests and then returns, while
xcb_aux_sync() waits for the server before returning, meaning the calls
will be done synchronously.
Diffstat:
M chwb.c | 7 ++++---
M chwso.c | 3 ++-
M config.mk | 2 +-
M ignw.c | 3 ++-
M killw.c | 3 ++-
M lsw.c | 1 +
M mapw.c | 3 ++-
M pfw.c | 1 +
M util.c | 1 +
M wattr.c | 1 +
M wmp.c | 3 ++-
M wmv.c | 3 ++-
M wrs.c | 3 ++-
M wtf.c | 3 ++-
M wtp.c | 3 ++-
15 files changed, 27 insertions(+), 13 deletions(-)
---
(DIR) diff --git a/chwb.c b/chwb.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
t@@ -44,7 +45,7 @@ set_border(int width, int color, xcb_window_t win)
mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_BORDER_WIDTH ;
xcb_configure_window(conn, win, mask, values);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
free(geom);
}
t@@ -54,7 +55,7 @@ set_border(int width, int color, xcb_window_t win)
mask = XCB_CW_BORDER_PIXEL;
xcb_change_window_attributes(conn, win, mask, values);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
}
}
t@@ -87,7 +88,7 @@ main(int argc, char **argv)
while (*argv)
set_border(width, color, strtoul(*argv++, NULL, 16));
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/chwso.c b/chwso.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
t@@ -58,7 +59,7 @@ main(int argc, char **argv)
} ARGEND
stack(win, values);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/config.mk b/config.mk
t@@ -5,5 +5,5 @@ CC = cc
LD = $(CC)
CFLAGS = -std=c99 -pedantic -Wall -Os
-LDFLAGS = -lxcb
+LDFLAGS = -lxcb -lxcb-util
(DIR) diff --git a/ignw.c b/ignw.c
t@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <err.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "arg.h"
#include "util.h"
t@@ -46,7 +47,7 @@ main(int argc, char **argv)
while (*argv)
set_override(strtoul(*argv++, NULL, 16), setflag);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/killw.c b/killw.c
t@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <err.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "arg.h"
#include "util.h"
t@@ -46,7 +47,7 @@ main(int argc, char **argv)
}
}
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
return 0;
(DIR) diff --git a/lsw.c b/lsw.c
t@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <err.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "arg.h"
#include "util.h"
(DIR) diff --git a/mapw.c b/mapw.c
t@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <err.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "arg.h"
#include "util.h"
t@@ -62,7 +63,7 @@ main(int argc, char **argv)
break;
}
}
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/pfw.c b/pfw.c
t@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "util.h"
(DIR) diff --git a/util.c b/util.c
t@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "util.h"
(DIR) diff --git a/wattr.c b/wattr.c
t@@ -5,6 +5,7 @@
#include <string.h>
#include <err.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include "util.h"
(DIR) diff --git a/wmp.c b/wmp.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
t@@ -84,7 +85,7 @@ main(int argc, char **argv)
usage(argv0);
}
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
return 0;
(DIR) diff --git a/wmv.c b/wmv.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
t@@ -91,7 +92,7 @@ main(int argc, char **argv)
while (*argv)
move(strtoul(*argv++, NULL, 16), mode, x, y);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/wrs.c b/wrs.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
t@@ -84,7 +85,7 @@ main(int argc, char **argv)
while (*argv)
resize(strtoul(*argv++, NULL, 16), mode, x, y);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);
(DIR) diff --git a/wtf.c b/wtf.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
t@@ -35,7 +36,7 @@ main(int argc, char **argv)
xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, win,
XCB_CURRENT_TIME);
- xcb_flush(conn);
+ xcb_aux_sync(conn);
}
kill_xcb(&conn);
(DIR) diff --git a/wtp.c b/wtp.c
t@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
t@@ -52,7 +53,7 @@ main(int argc, char **argv)
teleport(win, atoi(argv[1]), atoi(argv[2]),
atoi(argv[3]), atoi(argv[4]));
- xcb_flush(conn);
+ xcb_aux_sync(conn);
kill_xcb(&conn);