[Xcb-commit] 4 commits - icccm

Arnaud Fontaine arnau at kemper.freedesktop.org
Tue Apr 6 03:22:05 PDT 2010


 icccm/Makefile.am |    2 
 icccm/icccm.c     |  179 +++++++++++++++++++++++++++++++++++++++--------
 icccm/xcb_icccm.h |  204 ++++++++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 328 insertions(+), 57 deletions(-)

New commits:
commit 962145e957ca283603f55c01fddb505be10583f4
Author: Arnaud Fontaine <arnau at debian.org>
Date:   Tue Mar 23 14:52:31 2010 +0000

    icccm: fix inconsistency in prototypes of WM_PROTOCOLS setters

diff --git a/icccm/icccm.c b/icccm/icccm.c
index 404a409..1c66a74 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -793,20 +793,20 @@ xcb_get_wm_hints_reply(xcb_connection_t *c,
 /* WM_PROTOCOLS */
 
 xcb_void_cookie_t
-xcb_set_wm_protocols_checked(xcb_connection_t *c, xcb_atom_t wm_protocols,
-                             xcb_window_t window, uint32_t list_len,
+xcb_set_wm_protocols_checked(xcb_connection_t *c, xcb_window_t window,
+                             xcb_atom_t wm_protocols, uint32_t list_len,
                              xcb_atom_t *list)
 {
   return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
-				     wm_protocols, XCB_ATOM_ATOM, 32, list_len, list);
+                                     wm_protocols, XCB_ATOM_ATOM, 32, list_len, list);
 }
 
 xcb_void_cookie_t
-xcb_set_wm_protocols(xcb_connection_t *c, xcb_atom_t wm_protocols,
-                     xcb_window_t window, uint32_t list_len, xcb_atom_t *list)
+xcb_set_wm_protocols(xcb_connection_t *c, xcb_window_t window,
+                     xcb_atom_t wm_protocols, uint32_t list_len, xcb_atom_t *list)
 {
   return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, wm_protocols,
-			     XCB_ATOM_ATOM, 32, list_len, list);
+                             XCB_ATOM_ATOM, 32, list_len, list);
 }
 
 xcb_get_property_cookie_t
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index d7598be..0de4638 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -993,19 +993,19 @@ uint8_t xcb_get_wm_hints_reply(xcb_connection_t *c,
  * @param list Atom list.
  */
 xcb_void_cookie_t xcb_set_wm_protocols_checked(xcb_connection_t *c,
-					       xcb_atom_t wm_protocols,
-					       xcb_window_t window,
-					       uint32_t list_len,
-					       xcb_atom_t *list);
+                                               xcb_window_t window,
+                                               xcb_atom_t wm_protocols,
+                                               uint32_t list_len,
+                                               xcb_atom_t *list);
 
 /**
  * @see xcb_set_wm_protocols_checked()
  */
 xcb_void_cookie_t xcb_set_wm_protocols(xcb_connection_t *c,
-				       xcb_atom_t wm_protocols,
-				       xcb_window_t window,
-				       uint32_t list_len,
-				       xcb_atom_t *list);
+                                       xcb_window_t window,
+                                       xcb_atom_t wm_protocols,
+                                       uint32_t list_len,
+                                       xcb_atom_t *list);
 
 /**
  * @brief WM_PROTOCOLS structure.
commit c99c1e064d371222f6b313f58627986bc8902667
Author: Arnaud Fontaine <arnau at debian.org>
Date:   Tue Mar 23 11:47:26 2010 +0000

    icccm: add WM_COLORMAP_WINDOWS

diff --git a/icccm/icccm.c b/icccm/icccm.c
index 49429e8..404a409 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -182,6 +182,84 @@ xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs, uint32_t long_len,
 				  data);
 }
 
+/* WM_COLORMAP_WINDOWS */
+
+xcb_void_cookie_t
+xcb_set_wm_colormap_windows_checked(xcb_connection_t *c,
+                                    xcb_window_t window,
+                                    xcb_atom_t wm_colormap_windows_atom,
+                                    uint32_t list_len,
+                                    const xcb_window_t *list)
+{
+  return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
+                                     wm_colormap_windows_atom, XCB_ATOM_WINDOW,
+                                     32, list_len, list);
+}
+
+xcb_void_cookie_t
+xcb_set_wm_colormap_windows(xcb_connection_t *c,
+                            xcb_window_t window,
+                            xcb_atom_t wm_colormap_windows_atom,
+                            uint32_t list_len,
+                            const xcb_atom_t *list)
+{
+  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+                             wm_colormap_windows_atom, XCB_ATOM_WINDOW, 32,
+                             list_len, list);
+}
+
+
+xcb_get_property_cookie_t
+xcb_get_wm_colormap_windows(xcb_connection_t *c,
+                            xcb_window_t window,
+                            xcb_atom_t wm_colormap_windows_atom )
+{
+  return xcb_get_property(c, 0, window, wm_colormap_windows_atom,
+                          XCB_ATOM_WINDOW, 0, UINT_MAX);
+}
+
+xcb_get_property_cookie_t
+xcb_get_wm_colormap_windows_unchecked(xcb_connection_t *c,
+                                      xcb_window_t window,
+                                      xcb_atom_t wm_colormap_windows_atom)
+{
+  return xcb_get_property_unchecked(c, 0, window, wm_colormap_windows_atom,
+                                    XCB_ATOM_WINDOW, 0, UINT_MAX);
+}
+
+uint8_t
+xcb_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply,
+                                       xcb_get_wm_colormap_windows_reply_t *colormap_windows)
+{
+  if(!reply || reply->type != XCB_ATOM_WINDOW || reply->format != 32)
+    return 0;
+
+  colormap_windows->_reply = reply;
+  colormap_windows->windows_len = xcb_get_property_value_length(colormap_windows->_reply) /  (reply->format / 8);
+  colormap_windows->windows = (xcb_window_t *) xcb_get_property_value(colormap_windows->_reply);
+
+  return 1;
+}
+
+uint8_t
+xcb_get_wm_colormap_windows_reply(xcb_connection_t *c,
+                                  xcb_get_property_cookie_t cookie,
+                                  xcb_get_wm_colormap_windows_reply_t *colormap_windows,
+                                  xcb_generic_error_t **e)
+{
+  xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
+  uint8_t ret = xcb_get_wm_colormap_windows_from_reply(reply, colormap_windows);
+  if(!ret)
+    free(reply);
+  return ret;
+}
+
+void
+xcb_get_wm_colormap_windows_reply_wipe(xcb_get_wm_colormap_windows_reply_t *colormap_windows)
+{
+  free(colormap_windows->_reply);
+}
+
 /* WM_CLIENT_MACHINE */
 
 xcb_void_cookie_t
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index 5e838bd..d7598be 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -245,6 +245,98 @@ uint8_t xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs,
 			       xcb_generic_property_handler_t handler,
 			       void *data);
 
+/* WM_COLORMAP_WINDOWS */
+
+/**
+ * @brief Deliver a ChangeProperty request to set WM_COLORMAP_WINDOWS property value.
+ * @param c The connection to the X server.
+ * @param wm_colormap_windows The WM_COLORMAP_WINDOWS atom
+ * @param window Window X identifier.
+ * @param list_len Windows list len.
+ * @param list Windows list.
+ * @return The request cookie.
+ */
+xcb_void_cookie_t xcb_set_wm_colormap_windows_checked(xcb_connection_t *c,
+                                                      xcb_window_t window,
+                                                      xcb_atom_t wm_colormap_windows_atom,
+                                                      uint32_t list_len,
+                                                      const xcb_window_t *list);
+
+/**
+ * @see xcb_set_wm_colormap_windows_checked()
+ */
+xcb_void_cookie_t xcb_set_wm_colormap_windows(xcb_connection_t *c,
+                                              xcb_window_t window,
+                                              xcb_atom_t wm_colormap_windows_atom,
+                                              uint32_t list_len,
+                                              const xcb_window_t *list);
+
+/**
+ * @brief WM_COLORMAP_WINDOWS structure.
+ */
+typedef struct {
+  /** Length of the windows list */
+  uint32_t windows_len;
+  /** Windows list */
+  xcb_window_t *windows;
+  /** Store reply to avoid memory allocation, should normally not be
+      used directly */
+  xcb_get_property_reply_t *_reply;
+} xcb_get_wm_colormap_windows_reply_t;
+
+/**
+ * @brief Send request to get WM_COLORMAP_WINDOWS property of a given window.
+ * @param c The connection to the X server.
+ * @param window Window X identifier.
+ * @return The request cookie.
+ */
+xcb_get_property_cookie_t xcb_get_wm_colormap_windows(xcb_connection_t *c,
+                                                      xcb_window_t window,
+                                                      xcb_atom_t wm_colormap_windows_atom);
+
+/**
+ * @see xcb_get_wm_colormap_windows()
+ */
+xcb_get_property_cookie_t xcb_get_wm_colormap_windows_unchecked(xcb_connection_t *c,
+                                                                xcb_window_t window,
+                                                                xcb_atom_t wm_colormap_windows_atom);
+
+/**
+ * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window.
+ * @param reply The reply of the GetProperty request.
+ * @param colormap_windows WM_COLORMAP property value.
+ * @return Return 1 on success, 0 otherwise.
+ *
+ * protocols structure members should be freed by
+ * xcb_get_wm_protocols_reply_wipe().
+ */
+uint8_t xcb_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply,
+                                               xcb_get_wm_colormap_windows_reply_t *colormap_windows);
+/**
+ * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window.
+ * @param c The connection to the X server.
+ * @param cookie Request cookie.
+ * @param protocols WM_COLORMAP_WINDOWS property value.
+ * @param e Error if any.
+ * @return Return 1 on success, 0 otherwise.
+ *
+ * The parameter e supplied to this function must be NULL if
+ * xcb_get_wm_colormap_windows_unchecked() is used.  Otherwise, it
+ * stores the error if any. protocols structure members should be
+ * freed by xcb_get_wm_colormap_windows_reply_wipe().
+ */
+uint8_t xcb_get_wm_colormap_windows_reply(xcb_connection_t *c,
+                                          xcb_get_property_cookie_t cookie,
+                                          xcb_get_wm_colormap_windows_reply_t *windows,
+                                          xcb_generic_error_t **e);
+
+/**
+ * @brief Wipe protocols structure members previously allocated by
+ *        xcb_get_wm_colormap_windows_reply().
+ * @param windows windows structure whose members is going to be freed.
+ */
+void xcb_get_wm_colormap_windows_reply_wipe(xcb_get_wm_colormap_windows_reply_t *windows);
+
 /* WM_CLIENT_MACHINE */
 
 /**
commit 895da3b5c382756d2fb589d0b38e44a416a14532
Author: Arnaud Fontaine <arnau at debian.org>
Date:   Mon Mar 22 12:01:05 2010 +0000

    icccm: allow to set the encoding format for TEXT properties

diff --git a/icccm/Makefile.am b/icccm/Makefile.am
index da755d4..bd955f0 100644
--- a/icccm/Makefile.am
+++ b/icccm/Makefile.am
@@ -11,7 +11,7 @@ libxcb_icccm_la_SOURCES = icccm.c
 libxcb_icccm_la_CPPFLAGS = $(XCB_CFLAGS) $(XPROTO_CFLAGS) $(XCB_EVENT_CFLAGS) \
 	$(XCB_PROPERTY_CFLAGS)
 libxcb_icccm_la_LIBADD = $(XCB_LIBS) $(XPROTO_LIBS) $(XCB_PROPERTY_LIBS)
-libxcb_icccm_la_LDFLAGS = -version-info 1:0:0
+libxcb_icccm_la_LDFLAGS = -version-info 2:0:0
 
 pkgconfig_DATA = xcb-icccm.pc
 
diff --git a/icccm/icccm.c b/icccm/icccm.c
index dffca4f..49429e8 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -82,19 +82,21 @@ xcb_get_text_property_reply_wipe(xcb_get_text_property_reply_t *prop)
 
 xcb_void_cookie_t
 xcb_set_wm_name_checked(xcb_connection_t *c, xcb_window_t window,
-                        xcb_atom_t encoding, uint32_t name_len,
-                        const char *name)
+                        xcb_atom_t encoding, uint8_t format,
+                        uint32_t name_len, const char *name)
 {
-  return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_NAME,
-				     encoding, 8, name_len, name);
+  return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
+                                     XCB_ATOM_WM_NAME, encoding, format,
+                                     name_len, name);
 }
 
 xcb_void_cookie_t
 xcb_set_wm_name(xcb_connection_t *c, xcb_window_t window, xcb_atom_t encoding,
-                uint32_t name_len, const char *name)
+                uint8_t format, uint32_t name_len, const char *name)
 {
-  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_NAME,
-			     encoding, 8, name_len, name);
+  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+                             XCB_ATOM_WM_NAME, encoding, format, name_len,
+                             name);
 }
 
 xcb_get_property_cookie_t
@@ -131,20 +133,22 @@ xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len,
 
 xcb_void_cookie_t
 xcb_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window,
-                             xcb_atom_t encoding, uint32_t name_len,
-                             const char *name)
+                             xcb_atom_t encoding, uint8_t format,
+                             uint32_t name_len, const char *name)
 {
   return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
-				     XCB_ATOM_WM_ICON_NAME, encoding, 8, name_len,
-				     name);
+                                     XCB_ATOM_WM_ICON_NAME, encoding, format,
+                                     name_len, name);
 }
 
 xcb_void_cookie_t
 xcb_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window,
-                     xcb_atom_t encoding, uint32_t name_len, const char *name)
+                     xcb_atom_t encoding, uint8_t format, uint32_t name_len,
+                     const char *name)
 {
-  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_ICON_NAME,
-			     encoding, 8, name_len, name);
+  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+                             XCB_ATOM_WM_ICON_NAME, encoding, format,
+                             name_len, name);
 }
 
 xcb_get_property_cookie_t
@@ -182,22 +186,22 @@ xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs, uint32_t long_len,
 
 xcb_void_cookie_t
 xcb_set_wm_client_machine_checked(xcb_connection_t *c, xcb_window_t window,
-                                  xcb_atom_t encoding, uint32_t name_len,
-                                  const char *name)
+                                  xcb_atom_t encoding, uint8_t format,
+                                  uint32_t name_len, const char *name)
 {
   return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
-				     XCB_ATOM_WM_CLIENT_MACHINE, encoding, 8, name_len,
-				     name);
+                                     XCB_ATOM_WM_CLIENT_MACHINE, encoding,
+                                     format, name_len, name);
 }
 
 xcb_void_cookie_t
 xcb_set_wm_client_machine(xcb_connection_t *c, xcb_window_t window,
-                          xcb_atom_t encoding, uint32_t name_len,
-                          const char *name)
+                          xcb_atom_t encoding, uint8_t format,
+                          uint32_t name_len, const char *name)
 {
   return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
-			     XCB_ATOM_WM_CLIENT_MACHINE, encoding, 8, name_len,
-			     name);
+                             XCB_ATOM_WM_CLIENT_MACHINE, encoding, format,
+                             name_len, name);
 }
 
 xcb_get_property_cookie_t
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index dbe0600..5e838bd 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -119,21 +119,23 @@ void xcb_get_text_property_reply_wipe(xcb_get_text_property_reply_t *prop);
  * @param c The connection to the X server.
  * @param window Window X identifier.
  * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
  * @param name_len Length of name value to set.
  * @param name Name value to set.
  */
 xcb_void_cookie_t xcb_set_wm_name_checked(xcb_connection_t *c,
-					  xcb_window_t window,
-					  xcb_atom_t encoding,
-					  uint32_t name_len,
-					  const char *name);
+                                          xcb_window_t window,
+                                          xcb_atom_t encoding,
+                                          uint8_t format,
+                                          uint32_t name_len,
+                                          const char *name);
 
 /**
  * @see xcb_set_wm_name_checked()
  */
 xcb_void_cookie_t xcb_set_wm_name(xcb_connection_t *c, xcb_window_t window,
-				  xcb_atom_t encoding, uint32_t name_len,
-				  const char *name);
+                                  xcb_atom_t encoding, uint8_t format,
+                                  uint32_t name_len, const char *name);
 
 /**
  * @brief Deliver a GetProperty request to the X server for WM_NAME.
@@ -181,19 +183,26 @@ uint8_t xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len,
  * @param c The connection to the X server.
  * @param window Window X identifier.
  * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
  * @param name_len Length of name value to set.
  * @param name Name value to set.
  */
-xcb_void_cookie_t xcb_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window,
-					       xcb_atom_t encoding, uint32_t name_len,
-					       const char *name);
+xcb_void_cookie_t xcb_set_wm_icon_name_checked(xcb_connection_t *c,
+                                               xcb_window_t window,
+                                               xcb_atom_t encoding,
+                                               uint8_t format,
+                                               uint32_t name_len,
+                                               const char *name);
 
 /**
  * @see xcb_set_wm_icon_name_checked()
  */
-xcb_void_cookie_t xcb_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window,
-				       xcb_atom_t encoding, uint32_t name_len,
-				       const char *name);
+xcb_void_cookie_t xcb_set_wm_icon_name(xcb_connection_t *c,
+                                       xcb_window_t window,
+                                       xcb_atom_t encoding,
+                                       uint8_t format,
+                                       uint32_t name_len,
+                                       const char *name);
 
 /**
  * @brief Send request to get WM_ICON_NAME property of a window.
@@ -243,23 +252,26 @@ uint8_t xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs,
  * @param c The connection to the X server.
  * @param window Window X identifier.
  * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
  * @param name_len Length of name value to set.
  * @param name Name value to set.
  */
 xcb_void_cookie_t xcb_set_wm_client_machine_checked(xcb_connection_t *c,
-						    xcb_window_t window,
-						    xcb_atom_t encoding,
-						    uint32_t name_len,
-						    const char *name);
+                                                    xcb_window_t window,
+                                                    xcb_atom_t encoding,
+                                                    uint8_t format,
+                                                    uint32_t name_len,
+                                                    const char *name);
 
 /**
  * @see xcb_set_wm_client_machine_checked()
  */
 xcb_void_cookie_t xcb_set_wm_client_machine(xcb_connection_t *c,
-					    xcb_window_t window,
-					    xcb_atom_t encoding,
-					    uint32_t name_len,
-					    const char *name);
+                                            xcb_window_t window,
+                                            xcb_atom_t encoding,
+                                            uint8_t format,
+                                            uint32_t name_len,
+                                            const char *name);
 
 /**
  * @brief Send request to get WM_CLIENT_MACHINE property of a window.
commit 78c8d42c2aca0da69e0100cc517e7b29188b1971
Author: Arnaud Fontaine <arnau at debian.org>
Date:   Mon Mar 22 11:38:32 2010 +0000

    icccm: add missing setters for WM_CLASS and WM_TRANSIENT_FOR properties

diff --git a/icccm/icccm.c b/icccm/icccm.c
index c0139e4..dffca4f 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -233,6 +233,28 @@ xcb_watch_wm_client_machine(xcb_property_handlers_t *prophs, uint32_t long_len,
 
 /* WM_CLASS */
 
+xcb_void_cookie_t
+xcb_set_wm_class_checked(xcb_connection_t *c,
+                         xcb_window_t window,
+                         uint32_t class_len,
+                         const char *class)
+{
+  return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
+                                     XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8,
+                                     class_len, class);
+}
+
+xcb_void_cookie_t
+xcb_set_wm_class(xcb_connection_t *c,
+                 xcb_window_t window,
+                 uint32_t class_len,
+                 const char *class)
+{
+  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+                             XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8,
+                             class_len, class);
+}
+
 xcb_get_property_cookie_t
 xcb_get_wm_class(xcb_connection_t *c, xcb_window_t window)
 {
@@ -284,6 +306,25 @@ xcb_get_wm_class_reply_wipe(xcb_get_wm_class_reply_t *prop)
 
 /* WM_TRANSIENT_FOR */
 
+xcb_void_cookie_t
+xcb_set_wm_transient_for_checked(xcb_connection_t *c, xcb_window_t window,
+                                 xcb_window_t transient_for_window)
+{
+  return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
+                                     XCB_ATOM_WM_TRANSIENT_FOR,
+                                     XCB_ATOM_WINDOW, 32, 1,
+                                     &transient_for_window);
+}
+
+xcb_void_cookie_t
+xcb_set_wm_transient_for(xcb_connection_t *c, xcb_window_t window,
+                         xcb_window_t transient_for_window)
+{
+  return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+                             XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32,
+                             1, &transient_for_window);
+}
+
 xcb_get_property_cookie_t
 xcb_get_wm_transient_for(xcb_connection_t *c, xcb_window_t window)
 {
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index f205c4c..dbe0600 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -307,6 +307,32 @@ uint8_t xcb_watch_wm_client_machine(xcb_property_handlers_t *prophs,
 /**
  * @brief WM_CLASS hint structure
  */
+
+/**
+ * @brief Deliver a SetProperty request to set WM_CLASS property value.
+ *
+ * WM_CLASS string is a concatenation of the instance and class name
+ * strings respectively (including null character).
+ *
+ * @param c The connection to the X server.
+ * @param window Window X identifier.
+ * @param class_len Length of WM_CLASS string.
+ * @param class WM_CLASS string.
+ * @return The request cookie.
+ */
+xcb_void_cookie_t xcb_set_wm_class_checked(xcb_connection_t *c,
+                                           xcb_window_t window,
+                                           uint32_t class_len,
+                                           const char *class);
+
+/**
+ * @see xcb_set_wm_class_checked()
+ */
+xcb_void_cookie_t xcb_set_wm_class(xcb_connection_t *c,
+                                   xcb_window_t window,
+                                   uint32_t class_len,
+                                   const char *class);
+
 typedef struct {
   /** Instance name */
   char *instance_name;
@@ -371,6 +397,24 @@ void xcb_get_wm_class_reply_wipe(xcb_get_wm_class_reply_t *prop);
 /* WM_TRANSIENT_FOR */
 
 /**
+ * @brief Deliver a SetProperty request to set WM_TRANSIENT_FOR property value.
+ * @param c The connection to the X server.
+ * @param window Window X identifier.
+ * @param transient_for_window The WM_TRANSIENT_FOR window X identifier.
+ * @return The request cookie.
+ */
+xcb_void_cookie_t xcb_set_wm_transient_for_checked(xcb_connection_t *c,
+                                                   xcb_window_t window,
+                                                   xcb_window_t transient_for_window);
+
+/**
+ * @see xcb_set_wm_transient_for
+ */
+xcb_void_cookie_t xcb_set_wm_transient_for(xcb_connection_t *c,
+                                           xcb_window_t window,
+                                           xcb_window_t transient_for_window);
+
+/**
  * @brief Send request to get WM_TRANSIENT_FOR property of a window.
  * @param c The connection to the X server
  * @param window Window X identifier.


More information about the xcb-commit mailing list