about summary refs log tree commit diff stats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-14 17:48:54 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-14 17:48:54 +0200
commit4ad20ffc2c23d29329bc7349985d889f2cb45612 (patch)
tree24a0f665a6e14c68784242f5af875caf9d727a7d /client.c
parent57e6e3bb80b5fc4709de3f8b716a8b8065897c7a (diff)
downloaddwm-4ad20ffc2c23d29329bc7349985d889f2cb45612.tar.gz
fixed
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/client.c b/client.c
index 6a231b9..14edf7c 100644
--- a/client.c
+++ b/client.c
@@ -49,10 +49,12 @@ ban(Client *c)
 void
 focus(Client *c)
 {
-	if (!issel)
-		return;
 	Client *old = sel;
 
+	if (!issel)
+		return;
+	if(sel && sel->ismax)
+		togglemax(NULL);
 	sel = c;
 	if(old && old != c)
 		drawtitle(old);
@@ -68,9 +70,6 @@ focusnext(Arg *arg)
 	if(!sel)
 		return;
 
-	if(sel->ismax)
-		togglemax(NULL);
-
 	if(!(c = getnext(sel->next)))
 		c = getnext(clients);
 	if(c) {
@@ -87,9 +86,6 @@ focusprev(Arg *arg)
 	if(!sel)
 		return;
 
-	if(sel->ismax)
-		togglemax(NULL);
-
 	if(!(c = getprev(sel->prev))) {
 		for(c = clients; c && c->next; c = c->next);
 		c = getprev(c);
ground-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
MIT/X Consortium License

© 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
© 2006-2007 Jukka Salmi <jukka at salmi dot ch>
© 2007 Premysl Hruby <dfenze at gmail dot com>
© 2007 Szabolcs Nagy <nszabolcs at gmail dot com>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the 
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in 
all copies or substantial portions of the Software. 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
DEALINGS IN THE SOFTWARE.