X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.c;h=8b98c198bc61966955718be40e82f584a063141b;hb=1b9fe55025f84a8430b4be5822784551746eee8d;hp=cb5334e7a42df96b3734e39f6d725d8598addc35;hpb=2272df9d3179ec639066614f4d36d18df16ff725;p=dwm.git diff --git a/client.c b/client.c index cb5334e..8b98c19 100644 --- a/client.c +++ b/client.c @@ -73,12 +73,14 @@ focus(Client *c) { Client *old = sel; - if (!issel) + if(!issel) return; - if(sel && sel->ismax && sel != c) - togglemax(NULL); - sel = c; - if(old && old != c) { + if(!sel) + sel = c; + else if(sel != c) { + if(sel->ismax) + togglemax(NULL); + sel = c; grabbutton(old, AnyButton, 0); drawtitle(old); }