|
|
@ -337,9 +337,7 @@ isdamagenotify(session_t *ps, const XEvent *ev) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static inline XTextProperty *
|
|
|
|
static inline XTextProperty *
|
|
|
|
make_text_prop(session_t *ps, char *str) {
|
|
|
|
make_text_prop(session_t *ps, char *str) {
|
|
|
|
XTextProperty *pprop = malloc(sizeof(XTextProperty));
|
|
|
|
XTextProperty *pprop = cmalloc(1, XTextProperty);
|
|
|
|
if (!pprop)
|
|
|
|
|
|
|
|
printf_errfq(1, "(): Failed to allocate memory.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (XmbTextListToTextProperty(ps->dpy, &str, 1, XStringStyle, pprop)) {
|
|
|
|
if (XmbTextListToTextProperty(ps->dpy, &str, 1, XStringStyle, pprop)) {
|
|
|
|
cxfree(pprop->value);
|
|
|
|
cxfree(pprop->value);
|
|
|
@ -350,6 +348,25 @@ make_text_prop(session_t *ps, char *str) {
|
|
|
|
return pprop;
|
|
|
|
return pprop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Set a single-string text property on a window.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static inline bool
|
|
|
|
|
|
|
|
wid_set_text_prop(session_t *ps, Window wid, Atom prop_atom, char *str) {
|
|
|
|
|
|
|
|
XTextProperty *pprop = make_text_prop(ps, str);
|
|
|
|
|
|
|
|
if (!pprop) {
|
|
|
|
|
|
|
|
printf_errf("(\"%s\"): Failed to make text property.", str);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XSetTextProperty(ps->dpy, wid, pprop, prop_atom);
|
|
|
|
|
|
|
|
cxfree(pprop->value);
|
|
|
|
|
|
|
|
cxfree(pprop);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
run_fade(session_t *ps, win *w, unsigned steps);
|
|
|
|
run_fade(session_t *ps, win *w, unsigned steps);
|
|
|
|
|
|
|
|
|
|
|
|