commit e2298f718774133892937451d54dfed4e0df51f2
parent 7c44cba3cef20536bcc781e804e1582c80f6bcf7
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Thu, 9 Mar 2006 12:22:53 +0100
added Gimp and xmms as default broken apps to wmiirc, allowing ~-only in /def/class indicating that the client is handled as floating client, regardless the tag
Diffstat:
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/cmd/wm/area.c b/cmd/wm/area.c
@@ -18,7 +18,6 @@ alloc_area(Tag *t)
update_area_geometry(a);
t->area = (Area **)cext_array_attach((void **)t->area, a, sizeof(Area *), &t->areasz);
t->sel = t->narea;
- fprintf(stderr, "alloc_area: t->sel == %d\n", t->sel);
t->narea++;
return a;
}
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -109,7 +109,7 @@ focus_client(Client *c)
}
void
-map_client(Client * c)
+map_client(Client *c)
{
XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
XMapRaised(dpy, c->win);
@@ -118,7 +118,7 @@ map_client(Client * c)
}
void
-unmap_client(Client * c)
+unmap_client(Client *c)
{
ungrab_mouse(c->win, AnyModifier, AnyButton);
XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
@@ -331,6 +331,8 @@ manage_client(Client *c)
t = ntag ? tag[sel] : alloc_tag(def.tag);
cext_strlcat(c->tags, tc && strlen(tc->tags) ? tc->tags : t->name, sizeof(c->tags));
+ if(!strncmp(c->tags, "~", 2)) /* allows ~ predefinition to only set specific TClass'es floating */
+ cext_strlcat(c->tags, t->name, sizeof(c->tags));
update_tags();
/* shorthand proposed by Georg Neis */
diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c
@@ -223,6 +223,8 @@ update_tags()
t = tags[k];
if(*t == '~')
t++;
+ if(!*t) /* should not happen, but some user might try */
+ continue;
if(!has_tag(newctag, t, nnewctag)) {
newctag = (char **)cext_array_attach((void **)newctag, strdup(t),
sizeof(char *), &newctagsz);
diff --git a/rc/wmiirc b/rc/wmiirc
@@ -32,6 +32,11 @@ xwrite /def/snap 20
xwrite /def/font $WMII_FONT
xwrite /def/selcolors $WMII_SELCOLORS
xwrite /def/normcolors $WMII_NORMCOLORS
+# some broken apps:
+wmir create /def/class/'Gimp:*'
+xwrite /def/class/'Gimp:*' `~`
+wmir create /def/class/'xmms:*'
+xwrite /def/class/'xmms:*' `~`
# BAR CONFIGURATION
wmiir create /bar/foo