]> Dogcows Code - chaz/openbox/commitdiff
add set functions for setting name/icon name
authorDana Jansens <danakj@orodu.net>
Fri, 11 Apr 2003 04:11:08 +0000 (04:11 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 11 Apr 2003 04:11:08 +0000 (04:11 +0000)
cwmcc/client_props.c
cwmcc/client_props.h

index 126677cf28719ab137302be329d0475d2fa3d1db..dc0f4fa43c2e3640bb0cd46da7ca32e8923b568b 100644 (file)
@@ -5,6 +5,9 @@
 #include "render/render.h"
 
 #include <X11/Xutil.h>
+#ifdef HAVE_STRING_H
+#  include <string.h>
+#endif
 
 void cwmcc_client_get_protocols(Window win, Atom **protocols)
 {
@@ -52,6 +55,13 @@ void cwmcc_client_get_name(Window win, char **name)
         }
 }
 
+void cwmcc_client_set_name(Window win, char *name)
+{
+    XChangeProperty(cwmcc_display, win, CWMCC_ATOM(client, net_wm_name),
+                    CWMCC_ATOM(type, utf8), 32, PropModeReplace,
+                    (guchar*)name, strlen(name));
+}
+
 void cwmcc_client_get_icon_name(Window win, char **name)
 {
     if (!prop_get_string_utf8(win, CWMCC_ATOM(client, net_wm_icon_name), name))
@@ -62,6 +72,13 @@ void cwmcc_client_get_icon_name(Window win, char **name)
         }
 }
 
+void cwmcc_client_icon_set_name(Window win, char *name)
+{
+    XChangeProperty(cwmcc_display, win, CWMCC_ATOM(client, net_wm_icon_name),
+                    CWMCC_ATOM(type, utf8), 32, PropModeReplace,
+                    (guchar*)name, strlen(name));
+}
+
 void cwmcc_client_get_class(Window win, char **class, char **name)
 {
     char **s;
index 3f0153f784a8d169e714b84c4ec632b65c1ddfca..e88b214a83b826d4e3deabba0e0d48069762814a 100644 (file)
@@ -7,8 +7,10 @@ void cwmcc_client_get_wm_state(Window win, gulong *state);
 void cwmcc_client_set_wm_state(Window win, gulong state);
 
 void cwmcc_client_get_name(Window win, char **name);
+void cwmcc_client_set_name(Window win, char *name);
 
 void cwmcc_client_get_icon_name(Window win, char **name);
+void cwmcc_client_set_icon_name(Window win, char *name);
 
 void cwmcc_client_get_class(Window win, char **class, char **name);
 
This page took 0.02591 seconds and 4 git commands to generate.