summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-04-11 04:11:08 +0000
committerDana Jansens <danakj@orodu.net>2003-04-11 04:11:08 +0000
commit43f01ee9f081c8cb473c3358bbc02f758ab0014b (patch)
treea9f9912e08ffae6443781851df1d40e239c4ca6e
parentd976fc6bb1baebfb805c2f46e56306656fef5922 (diff)
add set functions for setting name/icon name
-rw-r--r--cwmcc/client_props.c17
-rw-r--r--cwmcc/client_props.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/cwmcc/client_props.c b/cwmcc/client_props.c
index 126677cf..dc0f4fa4 100644
--- a/cwmcc/client_props.c
+++ b/cwmcc/client_props.c
@@ -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;
diff --git a/cwmcc/client_props.h b/cwmcc/client_props.h
index 3f0153f7..e88b214a 100644
--- a/cwmcc/client_props.h
+++ b/cwmcc/client_props.h
@@ -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);