[hackers] [tabbed] display cmd info on tabbed-win || Connor Lane Smith
changeset: 150:71992a9dad5f
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sun Nov 20 17:38:48 2011 +0100
files: tabbed.c
description:
display cmd info on tabbed-win
diff -r 95344b86cfec -r 71992a9dad5f tabbed.c
--- a/tabbed.c Sun Nov 20 16:15:48 2011 +0100
+++ b/tabbed.c Sun Nov 20 17:38:48 2011 +0100
_AT_@ -377,7 +377,12 @@
focus(Client *c) {
/* If c, sel and clients are NULL, raise tabbed-win itself */
if(!c && !(c = sel ? sel : clients)) {
- XStoreName(dpy, win, "tabbed-"VERSION);
+ char buf[BUFSIZ] = "tabbed-"VERSION" ::";
+ size_t i, n;
+
+ for(i = 0, n = strlen(buf); cmd[i] && n < sizeof buf; i++)
+ n += snprintf(&buf[n], sizeof buf - n, " %s", cmd[i]);
+ XStoreName(dpy, win, buf);
XRaiseWindow(dpy, win);
return;
}
Received on Sun Nov 20 2011 - 17:38:57 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 20 2011 - 17:48:05 CET