xclock's reverseVideo draws black on black

Bug #788596 reported by Ralph Corderoy
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
x11-apps (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: x11-apps

Package x11-apps 7.5+5. When xclock is given -rv it has a black background instead of a white one but much of the clock isn't drawn; presumably those missing bits are still being drawn in black.

Easy to confirm; compare `xclock' and `xclock -rv'. Adding -norender changes the behaviour; white hands are now visible with -rv but the clock face is still missing. With -digital no text is displayed.

It has been like this for several releases but decades ago it used to work just fine. I suspect the render additions are what's caused the bugs.

Revision history for this message
John Carlyle-Clarke (jpcc) wrote :

I can confirm that this exists in 11.04 with version 7.6+4ubuntu2. The behaviour is exactly as described.

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Setting to Confirmed. Bad form to confirm one's own bugs I know but John's seeing the same.

Changed in x11-apps (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Rainey (ckrzen) wrote :

OK. SO here's what I've found:

"! xclock
! ------
! Most of the resource parts of the man page for xclock are useless,
! because the resources they describe (foreground, hands, etc.) are ignored
! if Xrender is in effect to draw an antialiased xclock. You can disable
! Xrender so as to use these (using the -norender parameter), but the result
! looks awful. Instead, you need a different set of resources, which are not
! documented in xclock but must be reverse-engineered from the systemwide
! app-defaults file for XClock color (/usr/share/X11/app-defaults/XClock-color).
! (Plus "background", but NOT "foreground".)
!
! See a good discussion by "syntaxerror" and "Drav Sloan" at:
! http://unix.stackexchange.com/questions/89304/facelifting-xclock-while-using-xrender-a-long-and-winding-road
!
! majorColor is the 5-minute tick-marks
! minorColor is the 1-minute tick-marks
! hourColor is the hour hand
! minuteColor is the minute hand
! secondColor would be, I presume, the second hand"

SOURCE: http://www.galleyrack.com/images/artifice/programming/useful/fvwm/configuration/dot-Xresources

I've been able to produce decent results for viewing from across a room while having morning coffee, etc. It stays outta the window-switcher(alt-tab) and hence outta my way while navigating the Mutter/GNOME Shell interface at other times with this config(see attached for a screenshot):

chris@CKR-1:~$ cat .Xresources

XClock*background: #2C3133
XClock*majorColor: grey60
XClock*minorColor: grey40
XClock*hourColor: grey80
XClock*minuteColor: grey80
XClock*width: 400
XClock*height: 400

Revision history for this message
Chris Rainey (ckrzen) wrote :

Seems to be working normally and without any workarounds in Ubuntu 18.10.

Changed in x11-apps (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Hi Chris, that's not what I'm seeing. Please describe what it is you are seeing working normally, and confirm you've no .Xresources, etc., implicitly in play. I see xclock(1) now describes hourColor, etc., and says that reverseVideo, AKA -rv, affects their defaults.

Revision history for this message
Chris Rainey (ckrzen) wrote : Re: [Bug 788596] Re: xclock's reverseVideo draws black on black

I'm using a stock Ubuntu 18.10 installation(although I'm using the openbox
window-manager) in an Xorg display server session. When I fire up a
gnome-terminal and type:

$ xclock -rv

I get a reversed video xclock which has all hands visible and appears to be
the 'reverse' of a standard xclock background color scheme. Please see the
attached screenshot, if it will come through on launchpad's bug comments.

On Fri, Dec 28, 2018 at 6:44 AM Ralph Corderoy <email address hidden>
wrote:

> Hi Chris, that's not what I'm seeing. Please describe what it is you
> are seeing working normally, and confirm you've no .Xresources, etc.,
> implicitly in play. I see xclock(1) now describes hourColor, etc., and
> says that reverseVideo, AKA -rv, affects their defaults.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/788596
>
> Title:
> xclock's reverseVideo draws black on black
>
> Status in x11-apps package in Ubuntu:
> Fix Released
>
> Bug description:
> Binary package hint: x11-apps
>
> Package x11-apps 7.5+5. When xclock is given -rv it has a black
> background instead of a white one but much of the clock isn't drawn;
> presumably those missing bits are still being drawn in black.
>
> Easy to confirm; compare `xclock' and `xclock -rv'. Adding -norender
> changes the behaviour; white hands are now visible with -rv but the
> clock face is still missing. With -digital no text is displayed.
>
> It has been like this for several releases but decades ago it used to
> work just fine. I suspect the render additions are what's caused the
> bugs.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/x11-apps/+bug/788596/+subscriptions
>

Revision history for this message
Chris Rainey (ckrzen) wrote :

Here's my current resource file for what I like at the moment:

~$ cat .Xresources
*background: #000000
*foreground: #ffffff

XClock*majorColor: #666666
XClock*minorColor: #444444
XClock*hourColor: #888888
XClock*minuteColor: #888888
XClock*secondColor: #222222
XClock*geometry: 350x350-125+75

See this thread for more infor: https://unix.stackexchange.com/questions/89304/facelifting-xclock-while-using-xrender-a-long-and-winding-road

Revision history for this message
Chris Rainey (ckrzen) wrote :

* CORRECTION * It is necessary to specify the class or instance for correct application of preferences when logging in to a fresh session due to the app defaults in:

/etc/X11/app-defaults/XClock*

From the xclock man page:

"WIDGETS
       In order to specify resources, it is useful to know the hierarchy of the widgets which compose xclock. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.

       XClock xclock
               Clock clock
"

so, my corrected .Xresources file would be this:

~$ cat .Xresources
*background: #000000
*foreground: #ffffff

XClock.Clock.majorColor: #666666
XClock.Clock.minorColor: #444444
XClock.Clock.hourColor: #888888
XClock.Clock.minuteColor: #888888
XClock.Clock.secondColor: #222222
XClock*geometry: 350x350-125+75

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.