summarylogtreecommitdiffstats
path: root/fix_12_year_display.patch
blob: 27609410b157c062f4766d11ccf3e390c980d7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Fix display when both -12 and -year are given
Author: Vino Fernando Crescini <jcrescin@cit.uws.edu.au>
Bug-Debian: http://bugs.debian.org/228985

Index: wmclock-1.0.14/wmclock.c
===================================================================
--- wmclock-1.0.14.orig/wmclock.c	2010-12-22 13:12:28.000000000 +0100
+++ wmclock-1.0.14/wmclock.c	2011-06-02 12:11:51.233840631 +0200
@@ -849,7 +849,14 @@
 #endif /* !ONLY_SHAPED_WINDOW */
    for (i = 0; i < NUM_TIME_POSITIONS; i++)
     {
-       xPos[i] += enable12HourClock ? timePos24[i] : timePos12[i];
+      if (enable12HourClock && (!enableYearDisplay))
+       {
+         xPos[i] += timePos24[i];
+       }
+      else
+       {
+         xPos[i] += timePos12[i];
+       }
     }
    
    /* Open the display */