diff options
| author | rsc <devnull@localhost> | 2004-03-21 23:24:28 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-03-21 23:24:28 +0000 |
| commit | e62ba5ec0bd3245fb70b033d3e4969b00db91452 (patch) | |
| tree | e0650b08518cf74a54dff913e2767b3fd7f9daf5 /src/cmd/rio/manage.c | |
| parent | 64044a070aab10224b1ccfc1a974887d5ec0c7aa (diff) | |
| download | plan9port-e62ba5ec0bd3245fb70b033d3e4969b00db91452.tar.gz plan9port-e62ba5ec0bd3245fb70b033d3e4969b00db91452.zip | |
Fix lots of warnings.
Incorporate changes from Andrey Mirtchovski.
Diffstat (limited to 'src/cmd/rio/manage.c')
| -rw-r--r-- | src/cmd/rio/manage.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd/rio/manage.c b/src/cmd/rio/manage.c index 3384daf2..94e6bf9c 100644 --- a/src/cmd/rio/manage.c +++ b/src/cmd/rio/manage.c @@ -1,5 +1,6 @@ /* Copyright (c) 1994-1996 David Hogan, see README for licence details */ #include <stdio.h> +#include <stdlib.h> #include <X11/X.h> #include <X11/Xos.h> #include <X11/Xlib.h> @@ -9,6 +10,8 @@ #include "dat.h" #include "fns.h" +int isNew; + int manage(Client *c, int mapped) { @@ -25,7 +28,11 @@ manage(Client *c, int mapped) if (XGetClassHint(dpy, c->window, &class) != 0) { /* ``Success'' */ c->instance = class.res_name; c->class = class.res_class; - c->is9term = (strcmp(c->class, "9term") == 0); + c->is9term = 0; + if(isNew){ + c->is9term = strstr(c->class, "term") || strstr(c->class, "Term"); + isNew = 0; + } } else { c->instance = 0; @@ -257,7 +264,7 @@ gravitate(Client *c, int invert) dy = 2*delta; break; default: - fprintf(stderr, "9wm: bad window gravity %d for 0x%x\n", gravity, c->window); + fprintf(stderr, "9wm: bad window gravity %d for 0x%x\n", gravity, (int)c->window); return; } dx += BORDER; |
