wmclock: Fix display when both -12 and -year are given.

Patch by Vino Fernando Crescini <jcrescin@cit.uws.edu.au>:
http://sources.debian.net/src/wmclock/1.0.14-6/debian/patches/fix_12_year_display.patch/

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=228985
This commit is contained in:
Doug Torrance 2014-12-11 09:18:06 -06:00 committed by Carlos R. Mafra
parent 706fa6cb9f
commit db7fcf291b

View file

@ -849,7 +849,14 @@ int main(int argc, char **argv)
#endif /* !ONLY_SHAPED_WINDOW */ #endif /* !ONLY_SHAPED_WINDOW */
for (i = 0; i < NUM_TIME_POSITIONS; i++) 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 */ /* Open the display */