Add height for width layout mode in horizontal orientation.
Submitted by Andrzej
Link to original bug (#664779)
Description
I'm working on a pager panel plugin (for XFCE) using a WNCK pager.
The pager is instantiated horizontally even though the panel itself is in a vertical mode. Unfortunately WNCK pager, when in horizontal mode, defaults to a width for height policy, which interferes badly with the vertical panel (it forces the width and expects the plugins to decide the height on their own).
Currently I have a workaround for this behavior in my plugin code but it is nasty hack (in some situations it may result in infinite event looping). I'd really like this issue to be addressed in the WNCK pager itself, which would be an easy fix.
For your reference, the plugin using the WNCK pager is in: https://github.com/andrzej-r/xfce4-panel/blob/deskbar_mode/plugins/pager/pager.c
The relevant commits working around the WNCK pager limitations are: https://github.com/andrzej-r/xfce4-panel/commit/a13e5d342d24c20b305a675af99e419eaecc5a0c https://github.com/andrzej-r/xfce4-panel/commit/e374978220d11adc1830b383d557817aca5a0a32 https://github.com/andrzej-r/xfce4-panel/commit/66a2044633a33942e746d4e1a8c55653863e1c00 https://github.com/andrzej-r/xfce4-panel/commit/0d785dc80ee6c00e0fab76d422137df0def18eb4
I imagine adding such functionality would require extending the API with something like:
void wnck_pager_set_layout_policy (WnckPager *pager, WnckPagerLayoutPolicy policy); typedef enum { WNCK_PAGER_LAYOUT_POLICY_AUTOMATIC, //current behavior, default WNCK_PAGER_LAYOUT_POLICY_WIDTH_FOR_HEIGHT, WNCK_PAGER_LAYOUT_POLICY_HEIGHT_FOR_WIDTH } WnckPagerLayoutPolicy;
If such API extension can be accepted, I'll go ahead and implement this feature on top of libwnck-2.30.