mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
fixed two bugs reported by nion and lavish
This commit is contained in:
parent
69b59ade71
commit
5a2a5d41b5
@ -64,7 +64,8 @@ destroy_label(Label *l)
|
||||
unsigned int
|
||||
bar_height()
|
||||
{
|
||||
return xfont->ascent + xfont->descent + 4;
|
||||
enum { BAR_PADDING = 4 };
|
||||
return xfont->ascent + xfont->descent + BAR_PADDING;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -333,7 +333,7 @@ manage_client(Client *c)
|
||||
if(c->trans && (trans = win2client(c->trans)))
|
||||
cext_strlcpy(c->tags, trans->tags, sizeof(c->tags));
|
||||
else
|
||||
match_tags(c, True);
|
||||
match_tags(c);
|
||||
|
||||
reparent_client(c, c->framewin, c->rect.x, c->rect.y);
|
||||
update_views(c);
|
||||
|
@ -99,7 +99,7 @@ update_rules()
|
||||
|
||||
|
||||
static void
|
||||
match(Client *c, const char *prop, Bool newclient)
|
||||
match(Client *c, const char *prop)
|
||||
{
|
||||
unsigned int i;
|
||||
regmatch_t tmpregm;
|
||||
@ -110,8 +110,19 @@ match(Client *c, const char *prop, Bool newclient)
|
||||
if(!strncmp(r->tags, "~", 2))
|
||||
c->floating = True;
|
||||
else if(!strncmp(r->tags, "!", 2)) {
|
||||
if(view.size && newclient)
|
||||
cext_strlcpy(c->tags, view.data[sel]->name, sizeof(c->tags));
|
||||
if(view.size) {
|
||||
if(c->view.size) {
|
||||
c->tags[0] = 0;
|
||||
unsigned int j;
|
||||
for(j = 0; j < c->view.size; j++) {
|
||||
cext_strlcat(c->tags, c->view.data[j]->name, sizeof(c->tags));
|
||||
if(j + 1 < c->view.size)
|
||||
cext_strlcat(c->tags, "+", sizeof(c->tags));
|
||||
}
|
||||
}
|
||||
else
|
||||
cext_strlcpy(c->tags, view.data[sel]->name, sizeof(c->tags));
|
||||
}
|
||||
}
|
||||
else
|
||||
cext_strlcpy(c->tags, r->tags, sizeof(c->tags));
|
||||
@ -120,14 +131,23 @@ match(Client *c, const char *prop, Bool newclient)
|
||||
}
|
||||
|
||||
void
|
||||
match_tags(Client *c, Bool newclient)
|
||||
match_tags(Client *c)
|
||||
{
|
||||
if(!def.rules)
|
||||
goto Fallback;
|
||||
match(c, c->name, newclient);
|
||||
match(c, c->classinst, newclient);
|
||||
match(c, c->name);
|
||||
match(c, c->classinst);
|
||||
|
||||
Fallback:
|
||||
if(!strlen(c->tags))
|
||||
cext_strlcpy(c->tags, "nil", sizeof(c->tags));
|
||||
}
|
||||
|
||||
void
|
||||
retag()
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0; i < client.size; i++)
|
||||
match_tags(client.data[i]);
|
||||
update_views();
|
||||
}
|
||||
|
@ -369,12 +369,3 @@ update_views()
|
||||
else
|
||||
update_bar_tags();
|
||||
}
|
||||
|
||||
void
|
||||
retag()
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0; i < client.size; i++)
|
||||
match_tags(client.data[i], False);
|
||||
update_views();
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ void ungrab_mouse(Window w, unsigned long mod, unsigned int button);
|
||||
|
||||
/* rule.c */
|
||||
void update_rules();
|
||||
void match_tags(Client *c, Bool newclient);
|
||||
void match_tags(Client *c);
|
||||
|
||||
/* view.c */
|
||||
void arrange_view(View *v, Bool dirty);
|
||||
|
@ -8,7 +8,7 @@ MANPREFIX = ${PREFIX}/share/man
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
VERSION = 20060411
|
||||
VERSION = 3-current
|
||||
|
||||
# includes and libs
|
||||
LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11
|
||||
|
@ -42,7 +42,7 @@ Let's go!
|
||||
will show you the content of the bar.
|
||||
|
||||
We hope that these steps gave you an idea of how wmii works. You can reread
|
||||
them at any time by pressing $MODKEY-Control-a and selecting 'welcome'.
|
||||
them at any time by pressing $MODKEY-a and selecting 'welcome'.
|
||||
|
||||
You should now take a look at the wmii(1) man page. An FAQ is available on
|
||||
<http://wmii.de>.
|
||||
|
Loading…
Reference in New Issue
Block a user