[client] Escape clients name
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0642e415dd
commit
ccfcde3555
9
client.c
9
client.c
|
@ -188,12 +188,17 @@ client_get_byname(client_t *list, char *name)
|
||||||
void
|
void
|
||||||
client_updatetitle(client_t *c)
|
client_updatetitle(client_t *c)
|
||||||
{
|
{
|
||||||
|
char buf[512];
|
||||||
|
|
||||||
if(!xutil_gettextprop(globalconf.connection, c->win,
|
if(!xutil_gettextprop(globalconf.connection, c->win,
|
||||||
xutil_intern_atom(globalconf.connection, "_NET_WM_NAME"),
|
xutil_intern_atom(globalconf.connection, "_NET_WM_NAME"),
|
||||||
c->name, sizeof(c->name)))
|
buf, sizeof(buf)))
|
||||||
xutil_gettextprop(globalconf.connection, c->win,
|
xutil_gettextprop(globalconf.connection, c->win,
|
||||||
xutil_intern_atom(globalconf.connection, "WM_NAME"),
|
xutil_intern_atom(globalconf.connection, "WM_NAME"),
|
||||||
c->name, sizeof(c->name));
|
buf, sizeof(buf));
|
||||||
|
if(c->name)
|
||||||
|
p_delete(&c->name);
|
||||||
|
c->name = g_markup_escape_text(buf, -1);
|
||||||
titlebar_draw(c);
|
titlebar_draw(c);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ typedef struct client_t client_t;
|
||||||
struct client_t
|
struct client_t
|
||||||
{
|
{
|
||||||
/** Client name */
|
/** Client name */
|
||||||
char name[256];
|
char *name;
|
||||||
/** Window geometry */
|
/** Window geometry */
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
/** Floating window geometry */
|
/** Floating window geometry */
|
||||||
|
|
Loading…
Reference in New Issue