cmd/rio: xshove: set geometry by window id
This commit is contained in:
parent
d46053106d
commit
4241cae2a1
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue