Reduce some variable scopes
Codacy things this is a good idea... Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
1a8acd3292
commit
e7982b7aba
|
@ -158,7 +158,6 @@ scan(xcb_query_tree_cookie_t tree_c)
|
||||||
xcb_get_window_attributes_reply_t *attr_r;
|
xcb_get_window_attributes_reply_t *attr_r;
|
||||||
xcb_get_geometry_reply_t *geom_r;
|
xcb_get_geometry_reply_t *geom_r;
|
||||||
xcb_get_property_cookie_t prop_cookie;
|
xcb_get_property_cookie_t prop_cookie;
|
||||||
long state;
|
|
||||||
|
|
||||||
tree_r = xcb_query_tree_reply(globalconf.connection,
|
tree_r = xcb_query_tree_reply(globalconf.connection,
|
||||||
tree_c,
|
tree_c,
|
||||||
|
@ -197,7 +196,7 @@ scan(xcb_query_tree_cookie_t tree_c)
|
||||||
NULL);
|
NULL);
|
||||||
geom_r = xcb_get_geometry_reply(globalconf.connection, geom_wins[i], NULL);
|
geom_r = xcb_get_geometry_reply(globalconf.connection, geom_wins[i], NULL);
|
||||||
|
|
||||||
state = xwindow_get_state_reply(state_wins[i]);
|
long state = xwindow_get_state_reply(state_wins[i]);
|
||||||
|
|
||||||
if(!geom_r || !attr_r || attr_r->override_redirect
|
if(!geom_r || !attr_r || attr_r->override_redirect
|
||||||
|| attr_r->map_state == XCB_MAP_STATE_UNMAPPED
|
|| attr_r->map_state == XCB_MAP_STATE_UNMAPPED
|
||||||
|
|
|
@ -356,7 +356,6 @@ window_set_xproperty(lua_State *L, xcb_window_t window, int prop_idx, int value_
|
||||||
{
|
{
|
||||||
xproperty_t *prop = luaA_find_xproperty(L, prop_idx);
|
xproperty_t *prop = luaA_find_xproperty(L, prop_idx);
|
||||||
xcb_atom_t type;
|
xcb_atom_t type;
|
||||||
uint8_t format;
|
|
||||||
size_t len;
|
size_t len;
|
||||||
uint32_t number;
|
uint32_t number;
|
||||||
const void *data;
|
const void *data;
|
||||||
|
@ -365,6 +364,7 @@ window_set_xproperty(lua_State *L, xcb_window_t window, int prop_idx, int value_
|
||||||
{
|
{
|
||||||
xcb_delete_property(globalconf.connection, window, prop->atom);
|
xcb_delete_property(globalconf.connection, window, prop->atom);
|
||||||
} else {
|
} else {
|
||||||
|
uint8_t format;
|
||||||
if(prop->type == PROP_STRING)
|
if(prop->type == PROP_STRING)
|
||||||
{
|
{
|
||||||
data = luaL_checklstring(L, value_idx, &len);
|
data = luaL_checklstring(L, value_idx, &len);
|
||||||
|
|
Loading…
Reference in New Issue