Skip to content

Add an hidden_event signal for plugins

guiohm requested to merge guiohm/xfce4-panel:add_hidden_signal into master

Context

I use genmon-plugin and I noticed some stuttering/dropped frames in games or when running mangohud vkcube caused by genmon on each update of its content (even when just doing a cat file).

There might be a solution to fix that in genmon itself (or it might be due to something else), but it pointed me to the fact that this happens even when the panel is hidden (which is 99% of the time for me).

Then I searched for the easy solution to not update when it's hidden and found that it was not implemented. I did find this old discussion: https://bugzilla.xfce.org/show_bug.cgi?id=4564

So I thought it would be a good way to step into the code and propose this little addition.

Implementation/proposal

  • I marked this PR as draft because I'm not a C developer and I'm expecting my changes to be wrong/incomplete, etc. I've not understood the whole code structure yet. Please advise me of any better/proper way.
  • There is a corresponding PR for genmon-plugin
  • The signal is a gboolean set to TRUE if PanelWindow->autohide_state = AUTOHIDE_HIDDEN
  • It is manually tested only on X11, Arch linux x86_64 (and I'm running this code right now as I type)

Here is the counterpart PR for genmon-plugin: panel-plugins/xfce4-genmon-plugin!20

Edited by guiohm

Merge request reports

Loading