[Xcb-commit] icccm
Julien Danjou
jdanjou at kemper.freedesktop.org
Tue Sep 16 08:46:20 PDT 2008
icccm/icccm.c | 24 ++++++++++++++----------
icccm/xcb_icccm.h | 9 +++++++++
2 files changed, 23 insertions(+), 10 deletions(-)
New commits:
commit 8efc9b87d1f3e13ed3e198b55ed355a508e0c130
Author: Julien Danjou <julien at danjou.info>
Date: Tue Sep 16 17:41:37 2008 +0200
icccm: introduce xcb_get_wm_transient_for_from_reply
Signed-off-by: Julien Danjou <julien at danjou.info>
diff --git a/icccm/icccm.c b/icccm/icccm.c
index 8e7baa5..ed5155f 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -280,25 +280,29 @@ xcb_get_wm_transient_for_unchecked(xcb_connection_t *c, xcb_window_t window)
}
uint8_t
-xcb_get_wm_transient_for_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_window_t *prop,
- xcb_generic_error_t **e)
+xcb_get_wm_transient_for_from_reply(xcb_window_t *prop,
+ xcb_get_property_reply_t *reply)
{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
-
if(!reply || reply->type != WINDOW || reply->format != 32 || !reply->length)
- {
- free(reply);
return 0;
- }
*prop = *((xcb_window_t *) xcb_get_property_value(reply));
- free(reply);
return 1;
}
+uint8_t
+xcb_get_wm_transient_for_reply(xcb_connection_t *c,
+ xcb_get_property_cookie_t cookie,
+ xcb_window_t *prop,
+ xcb_generic_error_t **e)
+{
+ xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
+ uint8_t ret = xcb_get_wm_transient_for_from_reply(prop, reply);
+ free(reply);
+ return ret;
+}
+
/* WM_SIZE_HINTS */
void
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index 3adf259..1514adb 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -367,6 +367,15 @@ xcb_get_property_cookie_t xcb_get_wm_transient_for_unchecked(xcb_connection_t *c
xcb_window_t window);
/**
+ * @brief Fill given window pointer with the WM_TRANSIENT_FOR property of a window.
+ * @param prop WM_TRANSIENT_FOR property value.
+ * @param reply The get property request reply.
+ * @return Return 1 on success, 0 otherwise.
+ */
+uint8_t
+xcb_get_wm_transient_for_from_reply(xcb_window_t *prop,
+ xcb_get_property_reply_t *reply);
+/**
* @brief Fill given structure with the WM_TRANSIENT_FOR property of a window.
* @param c The connection to the X server.
* @param cookie Request cookie.
More information about the xcb-commit
mailing list