[PATCH 20/23] wmsun: Fix need to restart for Daylight Savings change.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
Based on patch by Martin Stigge <[email protected]> to fix Debian
bug #414489 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414489
---
 wmsun/wmsun.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/wmsun/wmsun.c b/wmsun/wmsun.c
index 3f38497..4401aaa 100644
--- a/wmsun/wmsun.c
+++ b/wmsun/wmsun.c
@@ -103,8 +103,8 @@ int main(int argc, char *argv[]) {
     struct tm		*GMTTime, *LocalTime;
     XEvent		event;
     int			n;
-    int 		Year, Month, OldLocalDayOfMonth;
-    int			LocalDayOfMonth,	DayOfMonth;
+    int 		Year, Month;
+    int			DayOfMonth;
     long		CurrentLocalTime, CurrentGMTTime, date;
     double		UT, val, LTRise, LTSet, LocalHour, hour24();
     int			H, M;
@@ -135,7 +135,6 @@ int main(int argc, char *argv[]) {
      *  Loop until we die
      */
     n = 32000;
-    OldLocalDayOfMonth = -999;
     while(1) {
 
 
@@ -157,7 +156,7 @@ int main(int argc, char *argv[]) {
 	    struct tm result;
 
 	    n = 0;
-	    nMAX = 1000;
+	    nMAX = 60;
 
 
 	    CurrentGMTTime = time(CurrentTime);
@@ -171,9 +170,7 @@ int main(int argc, char *argv[]) {
 
 	    CurrentLocalTime = CurrentGMTTime;
 	    LocalTime = localtime_r(&CurrentLocalTime, &result);
-	    LocalDayOfMonth = LocalTime->tm_mday;
 
-	    if ((OldLocalDayOfMonth != LocalDayOfMonth)||(Flag)){
 
 		Flag = 0;
 
@@ -240,11 +237,6 @@ int main(int argc, char *argv[]) {
 	    	    copyXPMArea(10, 84, 28, 7, 19, 40);
 		}
 
-	    }
-
-	    OldLocalDayOfMonth = LocalDayOfMonth;
-
-
 	} else {
 
 	    /*
-- 
2.1.4


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.