From e73335d52d75b3288e774a4f09a0a93fcb71eae5 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 10 Oct 2015 17:42:25 +0200 Subject: [PATCH] Refactor code a little The previous commit added some variables and this commit makes the surrounding code use these new variables as well. Signed-off-by: Uli Schlachter --- event.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/event.c b/event.c index af58d3ac..eab45e38 100644 --- a/event.c +++ b/event.c @@ -341,8 +341,7 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev) uint16_t old_w = geometry.width; geometry.width = ev->width; /* The ConfigureRequest specifies the size of the client window, we want the frame */ - geometry.width += c->titlebar[CLIENT_TITLEBAR_LEFT].size; - geometry.width += c->titlebar[CLIENT_TITLEBAR_RIGHT].size; + geometry.width += tb_left + tb_right; diff_w = geometry.width - old_w; } if(ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT) @@ -350,15 +349,14 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev) uint16_t old_h = geometry.height; geometry.height = ev->height; /* The ConfigureRequest specifies the size of the client window, we want the frame */ - geometry.height += c->titlebar[CLIENT_TITLEBAR_TOP].size; - geometry.height += c->titlebar[CLIENT_TITLEBAR_BOTTOM].size; + geometry.height += tb_top + tb_bottom; diff_h = geometry.height - old_h; } if(ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH) { lua_State *L = globalconf_get_lua_State(); - diff_border = ev->border_width - c->border_width; + diff_border = ev->border_width - bw; diff_h += diff_border; diff_w += diff_border;