aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2009-06-20 00:55:41 +0000
committerokan2009-06-20 00:55:41 +0000
commitc54416ae163702858ce97808753af16c8c9b5921 (patch)
treee9d3394584e6cb28ee5e25f556f7ce000bb9cdc6 /client.c
parentc6af5e9b967797d315037b26aa05fec5b3e6ef44 (diff)
downloadcwm-c54416ae163702858ce97808753af16c8c9b5921.tar.gz
compact a bit by condensing a few if-else's; from Thomas Pfaff
"go on then" oga@
Diffstat (limited to 'client.c')
-rw-r--r--client.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/client.c b/client.c
index 7c6b470..5e694cb 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: client.c,v 1.54 2009/06/20 00:22:39 okan Exp $
+ * $Id: client.c,v 1.55 2009/06/20 00:55:41 okan Exp $
*/
#include "headers.h"
@@ -113,11 +113,7 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
/* Notify client of its configuration. */
xev_reconfig(cc);
- if (state == IconicState)
- client_hide(cc);
- else
- client_unhide(cc);
-
+ (state == IconicState) ? client_hide(cc) : client_unhide(cc);
xu_setstate(cc, cc->state);
XSync(X_Dpy, False);
@@ -345,11 +341,7 @@ client_ptrwarp(struct client_ctx *cc)
y = cc->geom.height / 2;
}
- if (cc->state == IconicState)
- client_unhide(cc);
- else
- client_raise(cc);
-
+ (cc->state == IconicState) ? client_unhide(cc) : client_raise(cc);
xu_ptr_setpos(cc->win, x, y);
}