From 80febe70a88a925fde75d57c8429820c3b9685a2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Apr 2008 11:38:35 +0200 Subject: [PATCH] [placement] Cosmetic --- placement.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/placement.c b/placement.c index d58c80fb..54c99ed0 100644 --- a/placement.c +++ b/placement.c @@ -131,18 +131,18 @@ placement_smart(Client *c) area_t placement_under_mouse(Client *c) { - xcb_query_pointer_reply_t *xqp; + xcb_query_pointer_cookie_t qp_c; + xcb_query_pointer_reply_t *qp_r; area_t finalgeometry = c->f_geometry; - if((xqp = xcb_query_pointer_reply(globalconf.connection, - xcb_query_pointer(globalconf.connection, - xcb_aux_get_screen(globalconf.connection, c->phys_screen)->root), - NULL)) != NULL) + qp_c = xcb_query_pointer(globalconf.connection, + xcb_aux_get_screen(globalconf.connection, c->phys_screen)->root); + if((qp_r = xcb_query_pointer_reply(globalconf.connection, qp_c, NULL))) { - finalgeometry.x = xqp->root_x - c->f_geometry.width / 2; - finalgeometry.y = xqp->root_y - c->f_geometry.height / 2; + finalgeometry.x = qp_r->root_x - c->f_geometry.width / 2; + finalgeometry.y = qp_r->root_y - c->f_geometry.height / 2; - p_delete(&xqp); + p_delete(&qp_r); } finalgeometry = titlebar_geometry_add(&c->titlebar, finalgeometry);