GNOME Bugzilla – Bug 90029
Workspace popup dimensions are funny
Last modified: 2004-12-22 21:47:04 UTC
I have 8 workspaces. I used to have a 4x2 popup window, but today, it turned into a 1x8 popup. A line of workspace windows going straight down. Actually, I do have my workspace switcher applet on a vertical panel, such that the switcher is a 2x4 grid. Maybe this is related?
libwnck was fixed to convey the orientation. So if you have a 2x4 vertical grid in the pager, the workspace switcher popup should match.
Sounds like it isn't matching, though? So still a bug?
Yes it's certainly a bug that we get 1x8 when the pager is 2x4.
This bug is related to markmc's fix in 89373. I'd like to fix this bug myself, it seems like it should be a simple fix. but I'm a bit stuck. a) Why is it always that either columns or rows is set to 0? b) is libwnck frozen? should there be an orientation argument added to wnck_screen_try_set_workspace_layout? c) which methods tell me the number of columns set in the workspace switcher and the orientation of the switcher?
The 0 means to compute that value from the other value. i.e. n_workspaces / columns = rows. libwnck isn't officially frozen but changing the soname would be sort of annoying. markmc had a hack in there to avoid it. A more extensive hack might be an internal function like _wnck_blah_blah_with_orientation(). the orientation and number of columns are just stored in internal private fields in the pager I believe.
Okay, I'll try to look at this. Maybe markmc will beat me to it. One more question: how do i test my changes? If i 'make install' libwnck and pkill metacity (to restart it), would that be sufficient?
You need to kill panel, not metacity. metacity doesn't use libwnck.
I just talked to markmc on IRC. The bug is kinda funny. Turns out his code is completely correct after all. The problem is that I have 3 pagers: one with the current workspace name, one with the current workspace and one with all the workspaces in a 2x4 grid; all the pagers are setting the hint, and that's what's causing the problem.
Havoc: the fix was straightforward so I went ahead and committed. Hope thats okay ... 2002-08-08 Mark McLoughlin <mark@skynet.ie> * libwnck/pager.c: (wnck_pager_set_layout_hint): don't set the hint if this pager isn't showing all workspaces - the chances are the users n_rows setting is not what is wanted. Index: libwnck/pager.c =================================================================== RCS file: /cvs/gnome/libwnck/libwnck/pager.c,v retrieving revision 1.25 diff -u -p -r1.25 pager.c --- libwnck/pager.c 4 Aug 2002 20:18:17 -0000 1.25 +++ libwnck/pager.c 7 Aug 2002 19:48:53 -0000 @@ -1002,6 +1002,14 @@ wnck_pager_set_layout_hint (WnckPager *p int layout_rows; int layout_cols; + /* The visual representation of the pager doesn't + * correspond to the layout of the workspaces + * here. i.e. the user will not pay any attention + * to the n_rows setting on this pager. + */ + if (!pager->priv->show_all_workspaces) + return; + if (pager->priv->orientation == GTK_ORIENTATION_HORIZONTAL) { layout_rows = pager->priv->n_rows;
I just tried this. It seems like the pager might not be setting the flag correctly? I'll try again tomorrow.