summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstderr64 <stderr64@null.net>2026-01-26 22:19:24 +0200
committerstderr64 <stderr64@null.net>2026-01-26 22:19:24 +0200
commit564f4fbbeff623d97e12c1f446d9a69d240ced5e (patch)
tree22ac5ec323522bb912697a79ca60f41e140d2918
parent4b87e49d19351a7b19758868138fc3044866ba44 (diff)
downloaddwmtimestatus-564f4fbbeff623d97e12c1f446d9a69d240ced5e.tar.gz
dwmtimestatus-564f4fbbeff623d97e12c1f446d9a69d240ced5e.tar.zst
Use XChangeProperty directly instead of going through XSetTextPropertyHEADmaster
-rw-r--r--dwmtimestatus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwmtimestatus.c b/dwmtimestatus.c
index 6c664b8..6edee28 100644
--- a/dwmtimestatus.c
+++ b/dwmtimestatus.c
@@ -49,7 +49,8 @@ void sighandler( int si_code, siginfo_t *si_info, void *si_adr ){
void update_status( struct status *status_info, XTextProperty *xprops ){
if ( status_info == NULL || xprops == NULL )
return;
- XSetTextProperty( status_info->dpy, status_info->root, xprops, XA_WM_NAME );
+ if ( XChangeProperty(status_info->dpy, status_info->root, XA_WM_NAME, XA_STRING, 8, PropModeReplace, (_Xconst unsigned char*)&status_info->status, (int)xprops->nitems) == BadLength )
+ fputs( "Error: XChangeProperty returned BadLength\n", stderr );
XSync( status_info->dpy, 0 );
return;
}