Skip to content

Commit

Permalink
x: remove unused x_get_prop_info and winprop_info
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelynothelix committed Oct 30, 2024
1 parent 54b07b6 commit e6bf014
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
19 changes: 0 additions & 19 deletions src/x.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,25 +290,6 @@ winprop_t x_get_prop_with_offset(const struct x_connection *c, xcb_window_t w, x
.ptr = NULL, .nitems = 0, .type = XCB_GET_PROPERTY_TYPE_ANY, .format = 0};
}

/// Get the type, format and size in bytes of a window's specific attribute.
winprop_info_t x_get_prop_info(const struct x_connection *c, xcb_window_t w, xcb_atom_t atom) {
xcb_generic_error_t *e = NULL;
auto r = xcb_get_property_reply(
c->c, xcb_get_property(c->c, 0, w, atom, XCB_ATOM_ANY, 0, 0), &e);
if (!r) {
log_debug_x_error(e, "Failed to get property info for window %#010x", w);
free(e);
return (winprop_info_t){
.type = XCB_GET_PROPERTY_TYPE_ANY, .format = 0, .length = 0};
}

winprop_info_t winprop_info = {
.type = r->type, .format = r->format, .length = r->bytes_after};
free(r);

return winprop_info;
}

/**
* Get the value of a type-<code>xcb_window_t</code> property of a window.
*
Expand Down
9 changes: 0 additions & 9 deletions src/x.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ typedef struct winprop {
xcb_get_property_reply_t *r;
} winprop_t;

typedef struct winprop_info {
xcb_atom_t type;
uint8_t format;
uint32_t length;
} winprop_info_t;

enum x_error_action {
PENDING_REPLY_ACTION_IGNORE,
PENDING_REPLY_ACTION_ABORT,
Expand Down Expand Up @@ -240,9 +234,6 @@ x_get_prop(const struct x_connection *c, xcb_window_t wid, xcb_atom_t atom, int
return x_get_prop_with_offset(c, wid, atom, 0L, length, rtype, rformat);
}

/// Get the type, format and size in bytes of a window's specific attribute.
winprop_info_t x_get_prop_info(const struct x_connection *c, xcb_window_t w, xcb_atom_t atom);

/**
* Get the value of a type-<code>xcb_window_t</code> property of a window.
*
Expand Down

0 comments on commit e6bf014

Please sign in to comment.