Always use unchecked xcb functions
This commit is contained in:
parent
d8104e8ad4
commit
452b89d6ec
|
@ -1111,7 +1111,7 @@ xcolor_new(xcb_connection_t *conn, int phys_screen, const char *colstr, xcolor_t
|
|||
blue = RGB_COLOR_8_TO_16(colnum);
|
||||
|
||||
hexa_color = xcb_alloc_color_reply(conn,
|
||||
xcb_alloc_color(conn,
|
||||
xcb_alloc_color_unchecked(conn,
|
||||
s->default_colormap,
|
||||
red, green, blue),
|
||||
NULL);
|
||||
|
@ -1130,7 +1130,7 @@ xcolor_new(xcb_connection_t *conn, int phys_screen, const char *colstr, xcolor_t
|
|||
else
|
||||
{
|
||||
named_color = xcb_alloc_named_color_reply(conn,
|
||||
xcb_alloc_named_color(conn,
|
||||
xcb_alloc_named_color_unchecked(conn,
|
||||
s->default_colormap,
|
||||
len,
|
||||
colstr),
|
||||
|
|
|
@ -95,7 +95,9 @@ xembed_info_get(xcb_connection_t *connection, xcb_window_t win, xembed_info_t *i
|
|||
atom_q = xutil_intern_atom(connection, NULL, "_XEMBED_INFO");
|
||||
atom = xutil_intern_atom_reply(connection, NULL, atom_q);
|
||||
|
||||
prop_c = xcb_get_property(connection, false, win, atom, XCB_GET_PROPERTY_TYPE_ANY, 0L, 2);
|
||||
prop_c = xcb_get_property_unchecked(connection, false, win, atom,
|
||||
XCB_GET_PROPERTY_TYPE_ANY, 0L, 2);
|
||||
|
||||
prop_r = xcb_get_property_reply(connection, prop_c, NULL);
|
||||
|
||||
if(!prop_r || !prop_r->value_len)
|
||||
|
|
|
@ -137,7 +137,7 @@ xutil_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win,
|
|||
/* Use checked because the error handler should not take care of
|
||||
* this error as we only return a boolean */
|
||||
t_hint_r = xcb_get_property_reply(c,
|
||||
xcb_get_property(c, false, win,
|
||||
xcb_get_property_unchecked(c, false, win,
|
||||
WM_TRANSIENT_FOR,
|
||||
WINDOW, 0, 1),
|
||||
NULL);
|
||||
|
|
6
event.c
6
event.c
|
@ -440,7 +440,7 @@ event_handle_maprequest(void *data __attribute__ ((unused)),
|
|||
xcb_get_geometry_reply_t *geom_r;
|
||||
xcb_screen_iterator_t iter;
|
||||
|
||||
wa_c = xcb_get_window_attributes(connection, ev->window);
|
||||
wa_c = xcb_get_window_attributes_unchecked(connection, ev->window);
|
||||
|
||||
if(!(wa_r = xcb_get_window_attributes_reply(connection, wa_c, NULL)))
|
||||
return -1;
|
||||
|
@ -455,10 +455,10 @@ event_handle_maprequest(void *data __attribute__ ((unused)),
|
|||
}
|
||||
else if(!(c = client_getbywin(ev->window)))
|
||||
{
|
||||
geom_c = xcb_get_geometry(connection, ev->window);
|
||||
geom_c = xcb_get_geometry_unchecked(connection, ev->window);
|
||||
|
||||
if(globalconf.screens_info->xinerama_is_active)
|
||||
qp_c = xcb_query_pointer(connection, xutil_screen_get(globalconf.connection,
|
||||
qp_c = xcb_query_pointer_unchecked(connection, xutil_screen_get(globalconf.connection,
|
||||
screen_nbr)->root);
|
||||
|
||||
if(!(geom_r = xcb_get_geometry_reply(connection, geom_c, NULL)))
|
||||
|
|
|
@ -134,8 +134,9 @@ placement_under_mouse(client_t *c)
|
|||
xcb_query_pointer_reply_t *qp_r;
|
||||
area_t finalgeometry = c->f_geometry;
|
||||
|
||||
qp_c = xcb_query_pointer(globalconf.connection,
|
||||
xutil_screen_get(globalconf.connection, c->phys_screen)->root);
|
||||
qp_c = xcb_query_pointer_unchecked(globalconf.connection,
|
||||
xutil_screen_get(globalconf.connection,
|
||||
c->phys_screen)->root);
|
||||
if((qp_r = xcb_query_pointer_reply(globalconf.connection, qp_c, NULL)))
|
||||
{
|
||||
finalgeometry.x = qp_r->root_x - c->f_geometry.width / 2;
|
||||
|
|
|
@ -138,7 +138,7 @@ systray_process_client_message(xcb_client_message_event_t *ev)
|
|||
switch(ev->data.data32[1])
|
||||
{
|
||||
case SYSTEM_TRAY_REQUEST_DOCK:
|
||||
geom_c = xcb_get_geometry(globalconf.connection, ev->window);
|
||||
geom_c = xcb_get_geometry_unchecked(globalconf.connection, ev->window);
|
||||
|
||||
if(!(geom_r = xcb_get_geometry_reply(globalconf.connection, geom_c, NULL)))
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue