* Nico Golde <[EMAIL PROTECTED]> [070715 01:54]:
> Hi,
> * Alexander Polakov <[EMAIL PROTECTED]> [2007-07-14 22:24]:
> > I dedicated one tag to my jabber client (gajim) and it's fine to give it
> > focus when toggling tag. This is a patch implementing this function.
>
> You forgot the attachment ;)
> Cheers
> Nico
> --
> Nico Golde - http://ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF
> For security reasons, all text in this mail is double-rot13 encrypted.
Oh, thanx! (: Here it is.
--
Alexander Polakov | http://polachok.livejournal.com
diff -u dwm-4.3/dwm.h dwm-polachok/dwm.h
--- dwm-4.3/dwm.h 2007-07-14 23:11:29.000000000 +0400
+++ dwm-polachok/dwm.h 2007-06-06 15:09:03.000000000 +0400
@@ -143,6 +143,7 @@
void tag(const char *arg); /* tags sel with arg's index */
void toggletag(const char *arg); /* toggles sel tags with arg's index */
void toggleview(const char *arg); /* toggles the tag with arg's index
(in)visible */
+void focusview(const char *arg); /* focus the first client on toggled
view */
void view(const char *arg); /* views the tag with arg's index */
/* util.c */
diff -u dwm-4.3/tag.c dwm-polachok/tag.c
--- dwm-4.3/tag.c 2007-07-14 23:11:29.000000000 +0400
+++ dwm-polachok/tag.c 2007-07-15 00:00:19.000000000 +0400
@@ -140,6 +140,21 @@
}
void
+focusview(const char *arg) {
+ Client *c;
+ int i;
+ toggleview(arg);
+ i = arg ? atoi(arg) : 0;
+ if (!seltag[i])
+ return;
+ for(c = clients; c; c = c->next)
+ if (c->tags[i])
+ {
+ focus(c);
+ break;
+ }
+}
+void
view(const char *arg) {
int i;