summaryrefslogtreecommitdiff
path: root/slock
diff options
context:
space:
mode:
Diffstat (limited to 'slock')
-rw-r--r--slock/slock.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/slock/slock.c b/slock/slock.c
index 0ec1780..430b014 100644
--- a/slock/slock.c
+++ b/slock/slock.c
@@ -914,6 +914,15 @@ main(int argc, char **argv) {
displayData.nscreens=nscreens;
displayData.crs=crs;
displayData.surfaces=surfaces;
+
+ /* Draw initial time on all screens */
+ time_t rawtime;
+ time(&rawtime);
+ struct tm tm = *localtime(&rawtime);
+ for (int k = 0; k < nscreens; k++) {
+ refresh(dpy, locks[k]->win, locks[k]->screen, tm, crs[k], surfaces[k]);
+ }
+
/*Start the thread that redraws time every 5 seconds*/
pthread_create(&thredid, NULL, displayTime, &displayData);
/*Wait for the password*/