From: Dana Jansens Date: Fri, 11 Apr 2003 04:11:08 +0000 (+0000) Subject: add set functions for setting name/icon name X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=43f01ee9f081c8cb473c3358bbc02f758ab0014b;p=chaz%2Fopenbox add set functions for setting name/icon name --- 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 +#ifdef HAVE_STRING_H +# include +#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);