Now some explanation; I added a lot of debug in libwnck
wnck_pager_set_layout_hint: Entry for 0x26bb1e0
_wnck_pager_set_screen: entry for 0x26bb1e0
_wnck_pager_set_screen: Exit for !gtk_widget_has_screen
wnck_pager_set_layout_hint: pager->priv->screen==NULL
libpager-Message: Setting the pager rows returned false. Maybe the setting is not applied.
_wnck_pager_set_screen: entry for 0x26bb1e0
wnck_pager_set_layout_hint: Entry for 0x26bb1e0
wnck_screen_try_set_workspace_layout entry: screen=0x26938b0 current_token=0 rows=3 columns=0
wnck_pager_set_layout_hint: bottom 1
_wnck_pager_set_screen: Exit bottom
wnck_pager_set_layout_hint: Entry for 0x26bb620
_wnck_pager_set_screen: entry for 0x26bb620
_wnck_pager_set_screen: Exit for !gtk_widget_has_screen
wnck_pager_set_layout_hint: pager->priv->screen==NULL
libpager-Message: Setting the pager rows returned false. Maybe the setting is not applied.
_wnck_pager_set_screen: entry for 0x26bb620
wnck_pager_set_layout_hint: Entry for 0x26bb620
wnck_screen_try_set_workspace_layout entry: screen=0x26938b0 current_token=0 rows=3 columns=0
wnck_pager_set_layout_hint: bottom 0
_wnck_pager_set_screen: in !set_layout_hint branch, before get_workspace_layout n_rows=3
!!! _wnck_pager_set_screen: in !set_layout_hint branch, after get_workspace_layout n_rows=1
_wnck_pager_set_screen: Exit bottom
update_workspace_layout on 0x26938b0
!!! update_workspace_layout on 0x26938b0: num_workspaces=9 rows=3 cols=0
update_workspace_layout on 0x26938b0
Note the two lines with !!!
What I think happens is that the 1st pager instance works OK, but for the 2nd pager we end up in _wnck_pager_set_screen and it has:
if (!wnck_pager_set_layout_hint (pager))
{
_WnckLayoutOrientation orientation;
/* we couldn't set the layout on the screen. This means someone else owns
* it. Let's at least show the correct layout. */
_wnck_screen_get_workspace_layout (pager->priv->screen, &orientation, &pager->priv->n_rows, NULL, NULL);
that should ensure that the 2nd pager has the same layout, but it doesn't work because as from that debug we see:
_wnck_pager_set_screen: in !set_layout_hint branch, after get_workspace_layout n_rows=1
so _wnck_screen_get_workspace_layout is getting the wrong answer - why?
Well I think it's set by update_workspace_layout, and we only see that called
later in the debug; it's normally called on idle - see update_idle.
But I guess there's no idle between the two pagers, so we get to the second pager and haven't setup it's screen's row data yet.
I'm not sure if wnck3 is any better at this; but is there any downside to just doing that force_update ?
I think I understand-ish why this is happening, and have a fix that makes it work, but I'm not sure if there are any side effects.
First the fix:
--- plugins/ pager/pager. c 2015-02-26 20:32:17.000000000 +0000 pager/pager. c 2015-05-31 16:23:35.682554450 +0100
gtk_widget_ destroy (GTK_WIDGET (plugin->pager)); force_update (plugin- >wnck_screen) ; force_update (plugin- >wnck_screen) ;
+++ fixed/plugins/
@@ -320,8 +320,8 @@
if (G_UNLIKELY (plugin->pager != NULL))
{
- wnck_screen_
}
+ wnck_screen_
mode = xfce_panel_ plugin_ get_mode (XFCE_PANEL_PLUGIN (plugin));
orientation =
------- ------- -------
Now some explanation; I added a lot of debug in libwnck
wnck_pager_ set_layout_ hint: Entry for 0x26bb1e0 set_screen: entry for 0x26bb1e0 set_screen: Exit for !gtk_widget_ has_screen set_layout_ hint: pager-> priv->screen= =NULL set_screen: entry for 0x26bb1e0 set_layout_ hint: Entry for 0x26bb1e0 try_set_ workspace_ layout entry: screen=0x26938b0 current_token=0 rows=3 columns=0 set_layout_ hint: bottom 1 set_screen: Exit bottom set_layout_ hint: Entry for 0x26bb620 set_screen: entry for 0x26bb620 set_screen: Exit for !gtk_widget_ has_screen set_layout_ hint: pager-> priv->screen= =NULL set_screen: entry for 0x26bb620 set_layout_ hint: Entry for 0x26bb620 try_set_ workspace_ layout entry: screen=0x26938b0 current_token=0 rows=3 columns=0 set_layout_ hint: bottom 0 set_screen: in !set_layout_hint branch, before get_workspace_ layout n_rows=3 set_screen: in !set_layout_hint branch, after get_workspace_ layout n_rows=1 set_screen: Exit bottom workspace_ layout on 0x26938b0 workspace_ layout on 0x26938b0: num_workspaces=9 rows=3 cols=0 workspace_ layout on 0x26938b0
_wnck_pager_
_wnck_pager_
wnck_pager_
libpager-Message: Setting the pager rows returned false. Maybe the setting is not applied.
_wnck_pager_
wnck_pager_
wnck_screen_
wnck_pager_
_wnck_pager_
wnck_pager_
_wnck_pager_
_wnck_pager_
wnck_pager_
libpager-Message: Setting the pager rows returned false. Maybe the setting is not applied.
_wnck_pager_
wnck_pager_
wnck_screen_
wnck_pager_
_wnck_pager_
!!! _wnck_pager_
_wnck_pager_
update_
!!! update_
update_
Note the two lines with !!! set_screen and it has: pager_set_ layout_ hint (pager)) WnckLayoutOrien tation orientation;
What I think happens is that the 1st pager instance works OK, but for the 2nd pager we end up in _wnck_pager_
if (!wnck_
{
_
/* we couldn't set the layout on the screen. This means someone else owns wnck_screen_ get_workspace_ layout (pager- >priv-> screen,
& orientation,
& pager-> priv->n_ rows,
NULL, NULL);
* it. Let's at least show the correct layout. */
_
that should ensure that the 2nd pager has the same layout, but it doesn't work because as from that debug we see:
_wnck_pager_ set_screen: in !set_layout_hint branch, after get_workspace_ layout n_rows=1
so _wnck_screen_ get_workspace_ layout is getting the wrong answer - why? workspace_ layout, and we only see that called
Well I think it's set by update_
later in the debug; it's normally called on idle - see update_idle.
But I guess there's no idle between the two pagers, so we get to the second pager and haven't setup it's screen's row data yet.
I'm not sure if wnck3 is any better at this; but is there any downside to just doing that force_update ?
Dave