diff --git a/src/xcb_util.cpp b/src/xcb_util.cpp index 9a28a81..bad0e71 100644 --- a/src/xcb_util.cpp +++ b/src/xcb_util.cpp @@ -267,6 +267,12 @@ ewmh_change_desktop (xcb_connection_t *c, xcb_window_t root, uint destkop_id) // of this spec, in which case the timestamp field should be ignored. send_xcb_message (c, root, "_NET_CURRENT_DESKTOP", { destkop_id }); } +/** + * Get information about + * all windows, including + * ids, related desktops, + * geometries and icons + */ std::vector get_windows (xcb_connection_t *c, xcb_window_t root) @@ -291,11 +297,10 @@ get_windows (xcb_connection_t *c, xcb_window_t root) auto desktop_id = get_property_value (c, id, "_NET_WM_DESKTOP"); - // TODO(sthussky): Get suitable window icon windows.emplace_back (desktop_id[0], uint (geometry->x), uint (geometry->y), geometry->width, - geometry->height); + geometry->height, get_property_value(c, id, "_NET_WM_ICON")); } return windows; } diff --git a/src/xcb_util.hpp b/src/xcb_util.hpp index 4c6ecc5..a658ab8 100644 --- a/src/xcb_util.hpp +++ b/src/xcb_util.hpp @@ -53,11 +53,11 @@ struct monitor_info struct window_info { uint desktop; ///< Id of the desktop the window belongs to - uint x; - uint y; + uint x; ///< Left upper angle coordinate + uint y; ///< Left upper angle coordinate uint width; uint height; - // xcb_pixmap_t *icon ; TODO(sthussky): implement this + std::vector icons; /// All posssible window inocns from EMWHs }; class xcb_error : public std::runtime_error