ref: ecafc4e97800a663083f9e75c548267fbade5c8e
parent: e9cfa1cdb931d4a611deac188a3f16e12603f57e
author: byte <byteshift@disroot.org>
date: Fri Dec 26 21:04:33 EST 2025
fixes
--- a/dat.h
+++ b/dat.h
@@ -210,7 +210,7 @@
void load_wallpaper(const char* wallpaper_path);
/* bringing function from rio.c here so it can be called from wallctl.c for redraw */
-/* this is ugly but is there a better way */
+/* this is ugly but is there a better way? */
void resized(void);
struct Dirtab
--- a/wallctl.c
+++ b/wallctl.c
@@ -98,7 +98,12 @@
tok = strchr(arg, '\n');
if(tok != nil)
arg[tok - arg] = '\0';
- wallpath = arg;
+ if(wallpath)
+ free(wallpath);
+ wallpath = malloc(strlen(arg));
+ strcpy(wallpath, arg);
+
+ //load_wallpaper(wallpath);
resized(); //this will set the wallpaper and handle re-drawing
return 1;
}
--
⑨