diff options
| author | Enno Boland (tox) <tox@s01.de> | 2009-09-08 06:57:19 +0200 |
|---|---|---|
| committer | Enno Boland (tox) <tox@s01.de> | 2009-09-08 06:57:19 +0200 |
| commit | b8139e44db0fcd6f1858e1eec00daeec93838de5 (patch) | |
| tree | c57262fd0026b7698987417d5116ef26329800a2 /tabbed.c | |
| parent | effedf8607c8cd46e82fef5ed9083eda727f608d (diff) | |
| download | tabbed-b8139e44db0fcd6f1858e1eec00daeec93838de5.tar.gz | |
adding reparent()
Diffstat (limited to 'tabbed.c')
| -rw-r--r-- | tabbed.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -77,6 +77,7 @@ static void keypress(XEvent *e); static void killclient(const Arg *arg); static void move(const Arg *arg); static void spawntab(const Arg *arg); +static void reparent(Window win); static void rotate(const Arg *arg); static void run(void); static void setup(void); @@ -260,6 +261,11 @@ spawntab(const Arg *arg) { } void +reparent(Window win) { + puts("reparent window"); +} + +void rotate(const Arg *arg) { puts("next/prev tab"); } @@ -268,7 +274,7 @@ void run(void) { char buf[32], *p; fd_set rd; - int r, xfd, maxfd; + int r, xfd, maxfd, wid; unsigned int offset = 0; XEvent ev; Listener *l, *pl; @@ -308,8 +314,9 @@ run(void) { default: for(p = buf + offset; r > 0; p++, r--, offset++) if(*p == '\n' || *p == '\0') { - printf("Got somthing: %s\n", buf); *p = '\0'; + if((wid = atoi(buf))) + reparent((Window)wid); p += r - 1; /* p is buf + offset + r - 1 */ for(r = 0; *(p - r) && *(p - r) != '\n'; r++); offset = r; |