monitor-style plugins and panel auto-hide
ongardie at gmail.com
Mon Nov 3 08:48:13 CET 2008
I just thought of an idea that might help improve efficiency for certain
panel configurations. I may be interested in implementing this for xfce
4.8 and wanted to get some early feedback.
Currently, I keep all my monitor-style plugins (CPU frequency, system
load, network, battery) in an auto-hidden panel. If the panel is hidden,
they have no reason to update their GUI (because I can't see it) or even
to periodically poll. Only when I move my mouse over there to show the
panel should the plugins concern themselves with updating their GUI.
This improvement would reduce wasted CPU cycles and wakeups. As a
result, it may also bring small improvements to power consumption and
I think a reasonable way to implement this would be to add a couple new
signals to the XfcePanelPlugin klass, say "show" and "hide". "show"
would be emitted when the panel is un-hidden, and "hide" would be
emitted when the panel goes back to its auto-hidden state. Monitoring
plugins could stop polling on the "hide" signal and restart polling on
the "show" signal.
Also, an optional xfce_panel_plugin_get_panel_hidden () would complement
the existing xfce_panel_plugin_set_panel_hidden () and the new signals.
What do you guys think? Is this a common usage scenario for the panel?
Do you foresee any complications with the proposed implementation?
More information about the Xfce4-dev