GNOME Bugzilla – Bug 471988
Switching from "graphic only" to "text only" does not draws text
Last modified: 2008-12-15 13:51:51 UTC
[ From http://bugs.debian.org/439829 by Marcus Lundblad ] "I have the CPU frequency applet set to display only graphics (just the bar). If I change this to "Text only" in the settings, there is no text at all. I then check "Show CPU frequency as percentage", now the applet displays "59%". If I then change it back to "Show as frequency" the text gets updated to "1,60 GHz". Also if I stress the computer (making it scale up the CPU frequency) the text display gets updated. So I suppose there is a redraw missing when switching mode. I don't recall seeing this bug (prior to Gnome 2.18)."
*** Bug 484836 has been marked as a duplicate of this bug. ***
Confirmed. Changing summary. Just add a cpufreq applet, set it to graphics (and now kill it so it starts in graphic-only mode), and then switch to text only. It won't show any text until an update is triggered by a change in freq or if you change to mixed mode.
Created attachment 123415 [details] [review] 20081126_bgo_471988_cpufreqapplet-show-modes.diff: proposed change This patch caches the show_mode so we can know if we were previously in graphics only and we jump to text only. I found a bug while hacking this: the cpu monitor can be used while still being uninitialized, the signal handlers for the applet are connected before the monitor is activated, my patch triggered this when the applet was started in text only mode. It might not be a bug but I think it's saner to put the monitor activation before connecting signals that might use it. Also I added two sanity checks in the update function, so the monitor can never be null and the governor either. I was hitting a case where the governor was null but the monitor had already been succesfully started, that meant I got (null) and the line governor[0] was obviously segfaulting. Cheers!
Thank you very much for the patch. I've found other situations where it also happened. I've just committed a very similar patch to svn trunk. Thanks!