diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-10 17:14:20 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-21 14:03:17 +0000 |
commit | ac7d811041782c6aeb428f08baaac99c0641e125 (patch) | |
tree | bc35dfb9ec6a6ff428878fc3dd218ab6c8901f55 | |
parent | 86a588986ec04983d490f5026b53a9192135b317 (diff) |
Remove some stale code
-rw-r--r-- | src/libxcwm/util.c | 53 | ||||
-rw-r--r-- | src/libxcwm/xcwm_internal.h | 14 |
2 files changed, 0 insertions, 67 deletions
diff --git a/src/libxcwm/util.c b/src/libxcwm/util.c index caa6048..66bdd5b 100644 --- a/src/libxcwm/util.c +++ b/src/libxcwm/util.c @@ -30,12 +30,6 @@ #include "xcwm_internal.h" #include <xcb/xcb.h> -/* Locally used structure */ -struct image_data_t { - uint8_t *data; - int length; -}; - xcb_get_window_attributes_reply_t * _xcwm_get_window_attributes(xcb_connection_t *conn, xcb_window_t window) { @@ -69,7 +63,6 @@ _xcwm_write_all_children_window_info(xcb_connection_t *conn, xcb_query_tree_reply_t *reply; xcb_query_tree_cookie_t tree_cookie; xcb_window_t *children; /* The children of the given root */ - image_data_t img_data; xcb_generic_error_t *error; int len; int i; @@ -90,10 +83,6 @@ _xcwm_write_all_children_window_info(xcb_connection_t *conn, root); for (i = 0; i < len; i++) { _xcwm_write_window_info(conn, children[i]); - img_data = _xcwm_get_window_image_data(conn, children[i]); - if (!img_data.data) { - printf("Image data is empty\n"); - } } printf("--- End window iteration ---\n"); @@ -101,48 +90,6 @@ _xcwm_write_all_children_window_info(xcb_connection_t *conn, free(reply); } -image_data_t -_xcwm_get_window_image_data(xcb_connection_t *conn, xcb_drawable_t window) -{ - image_data_t image_data; - xcb_get_image_cookie_t img_cookie; - xcb_get_image_reply_t *reply; - xcb_generic_error_t *error; - xcb_get_geometry_reply_t *geom_reply; - - image_data.data = NULL; - image_data.length = 0; - - geom_reply = _xcwm_get_window_geometry(conn, window); - if (!geom_reply) { - fprintf(stderr, "ERROR: Failed to get window image data.\n"); - return image_data; - } - - img_cookie = xcb_get_image(conn, - XCB_IMAGE_FORMAT_Z_PIXMAP, - window, - 0, - 0, - geom_reply->width, - geom_reply->height, - (unsigned int)~0L); - - reply = xcb_get_image_reply(conn, img_cookie, &error); - if (error) { - fprintf(stderr, "ERROR: Failed to get window image data reply: %d\n", - error->error_code); - return image_data; - } - image_data.data = xcb_get_image_data(reply); - image_data.length = xcb_get_image_data_length(reply); - - free(geom_reply); - /* free(reply); */ - - return image_data; -} - void _xcwm_write_window_info(xcb_connection_t *conn, xcb_window_t window) { diff --git a/src/libxcwm/xcwm_internal.h b/src/libxcwm/xcwm_internal.h index 4307008..e9ad0fa 100644 --- a/src/libxcwm/xcwm_internal.h +++ b/src/libxcwm/xcwm_internal.h @@ -93,11 +93,6 @@ struct xcwm_window_t { }; /** - * Local data type for image data. - */ -typedef struct image_data_t image_data_t; - -/** * Mutex lock supplied to client to lock event loop thread */ extern pthread_mutex_t event_thread_lock; @@ -138,15 +133,6 @@ _xcwm_write_all_children_window_info(xcb_connection_t *conn, xcb_window_t root); /** - * Get the image data for a window. - * @param conn the connection to the xserver. - * @param root the window ancestral to all children to be written. - * @return a structure containing data and data length. - */ -image_data_t -_xcwm_get_window_image_data(xcb_connection_t *conn, xcb_window_t window); - -/** * Write information about a window out to stdio. * TODO: Add the ability to pass in the stream to write to. * @param conn The connection with the window. |