"oclock" ignores colors for hands when transparent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
x11-apps (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
[reproduced on Precise]
[any versions of x11-apps have this bug]
"oclock -fg yellow -hour white -minute red -jewel blue -transparent"
makes hour-hand, minute-hand and jewel _red_ (the color only for minute-hand)
although
"oclock -fg yellow -hour white -minute red -jewel blue"
(without "-transparent") works fine.
i.e.
[expected] "oclock -transparent -hour red" paints its hour-hand red.
[actual result] The hour-hand is not red.
[cause] The code simplifies the routine too much when transparent, I guess. (though I'm not a programmer.)
If oclock is transparent, it apparently uses shapeGC to specify its non-transparent shape.
I guess it should also paint hourGC and minuteGC _over_ the shape.
[patch] (Maybe the last chunk is unnecessary. It seems that oclock works fine with or without it.)
diff -bpu oclock/
--- oclock/Clock.c.orig 2012-08-17 05:30:57.000000000 +0900
+++ oclock/Clock.c 2013-10-26 16:10:18.804424872 +0900
@@ -152,12 +152,6 @@ static void Initialize (Widget greq, Wid
valuemask = GCForeground;
- if (w->clock.
- {
- ;
- }
- else
- {
@@ -169,7 +163,6 @@ static void Initialize (Widget greq, Wid
- }
/* wait for Realize to add the timeout */
w-
@@ -371,12 +364,10 @@ static void Destroy (Widget gw)
{
ClockWidget w = (ClockWidget)gw;
if (w->clock.
- if (! w->clock.
- }
if (w->clock.shapeGC)
if (w->clock.
@@ -389,11 +380,8 @@ static void Redisplay(Widget gw, XEvent
ClockWidget w;
w = (ClockWidget) gw;
- if (!w->clock.
- {
paint_jewel (w, XtWindow (w), w->clock.jewelGC);
paint_hands (w, XtWindow (w), w->clock.minuteGC, w->clock.hourGC);
- }
}
/*
@@ -425,7 +413,6 @@ static void new_time (XtPointer client_d
Time_t now;
struct tm *tm;
- if (!w->clock.
if (w->clock.
@@ -449,7 +436,6 @@ static void new_time (XtPointer client_d
if (w->clock.
Resize ((Widget)w);
- else
} /* new_time */
The attachment "redraw hands and jewel over shape" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]