diff options
author | Nicola Girardi <nicola@aloc.in> | 2019-06-22 11:44:24 +0100 |
---|---|---|
committer | Dan Cross <crossd@gmail.com> | 2020-01-15 11:55:37 -0500 |
commit | 4241cae2a1ffe7a499ffd9d028e001fea7a678d6 (patch) | |
tree | 7745ee1994beb565eaaf0b0743636da1b77d1018 /src/cmd | |
parent | d46053106d746260ce0ab39458332bc31ce6948b (diff) | |
download | plan9port-4241cae2a1ffe7a499ffd9d028e001fea7a678d6.tar.gz plan9port-4241cae2a1ffe7a499ffd9d028e001fea7a678d6.tar.bz2 plan9port-4241cae2a1ffe7a499ffd9d028e001fea7a678d6.zip |
cmd/rio: xshove: set geometry by window id
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/rio/xshove.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/rio/xshove.c b/src/cmd/rio/xshove.c index e235874e..7358987e 100644 --- a/src/cmd/rio/xshove.c +++ b/src/cmd/rio/xshove.c @@ -27,6 +27,7 @@ struct Win int y; int dx; int dy; + char *idstr; char *class; char *instance; char *name; @@ -143,6 +144,9 @@ getinfo(void) if(attr.width <= 0 || attr.override_redirect || attr.map_state != IsViewable) continue; ww->xw = xwin[i]; + char idstr[9]; + snprint(idstr, sizeof(idstr), "%08x", (uint)ww->xw); + ww->idstr = strdup(idstr); ww->x = attr.x; ww->y = attr.y; ww->dx = attr.width; @@ -196,7 +200,8 @@ shove(char *name, char *geom) for(i=0; i<nw; i++){ Win *ww = &w[i]; if(ww->instance && strstr(ww->instance, name) - || ww->class && strstr(ww->class, name)){ + || ww->class && strstr(ww->class, name) + || ww->idstr && strstr(ww->idstr, name)){ int value_mask; XWindowChanges e; |