add set functions for setting name/icon name

This commit is contained in:
Dana Jansens 2003-04-11 04:11:08 +00:00
parent d976fc6bb1
commit 43f01ee9f0
2 changed files with 19 additions and 0 deletions

View 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;

View 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);