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 <psychon@znc.in>
This commit is contained in:
parent
367c3acbcd
commit
e73335d52d
8
event.c
8
event.c
|
@ -341,8 +341,7 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev)
|
||||||
uint16_t old_w = geometry.width;
|
uint16_t old_w = geometry.width;
|
||||||
geometry.width = ev->width;
|
geometry.width = ev->width;
|
||||||
/* The ConfigureRequest specifies the size of the client window, we want the frame */
|
/* The ConfigureRequest specifies the size of the client window, we want the frame */
|
||||||
geometry.width += c->titlebar[CLIENT_TITLEBAR_LEFT].size;
|
geometry.width += tb_left + tb_right;
|
||||||
geometry.width += c->titlebar[CLIENT_TITLEBAR_RIGHT].size;
|
|
||||||
diff_w = geometry.width - old_w;
|
diff_w = geometry.width - old_w;
|
||||||
}
|
}
|
||||||
if(ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT)
|
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;
|
uint16_t old_h = geometry.height;
|
||||||
geometry.height = ev->height;
|
geometry.height = ev->height;
|
||||||
/* The ConfigureRequest specifies the size of the client window, we want the frame */
|
/* The ConfigureRequest specifies the size of the client window, we want the frame */
|
||||||
geometry.height += c->titlebar[CLIENT_TITLEBAR_TOP].size;
|
geometry.height += tb_top + tb_bottom;
|
||||||
geometry.height += c->titlebar[CLIENT_TITLEBAR_BOTTOM].size;
|
|
||||||
diff_h = geometry.height - old_h;
|
diff_h = geometry.height - old_h;
|
||||||
}
|
}
|
||||||
if(ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)
|
if(ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)
|
||||||
{
|
{
|
||||||
lua_State *L = globalconf_get_lua_State();
|
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_h += diff_border;
|
||||||
diff_w += diff_border;
|
diff_w += diff_border;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue