After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90029 - Workspace popup dimensions are funny
Workspace popup dimensions are funny
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
unspecified
Other other
: Normal major
: ---
Assigned To: Duncan Mak
Luis Villa
Depends on:
Blocks:
 
 
Reported: 2002-08-06 16:43 UTC by Duncan Mak
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0



Description Duncan Mak 2002-08-06 16:43:34 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?
Comment 1 Havoc Pennington 2002-08-06 16:56:01 UTC
libwnck was fixed to convey the orientation. So if you have a 2x4
vertical grid in the pager, the workspace switcher popup should match.
Comment 2 Luis Villa 2002-08-06 16:58:01 UTC
Sounds like it isn't matching, though? So still a bug? 
Comment 3 Havoc Pennington 2002-08-06 17:09:51 UTC
Yes it's certainly a bug that we get 1x8 when the pager is 2x4.
Comment 4 Duncan Mak 2002-08-07 17:03:46 UTC
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?
Comment 5 Havoc Pennington 2002-08-07 18:25:24 UTC
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.
Comment 6 Duncan Mak 2002-08-07 18:30:35 UTC
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?
Comment 7 Havoc Pennington 2002-08-07 18:56:30 UTC
You need to kill panel, not metacity. metacity doesn't use libwnck.
Comment 8 Duncan Mak 2002-08-07 19:28:08 UTC
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.
Comment 9 Mark McLoughlin 2002-08-07 19:52:05 UTC
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;

Comment 10 Duncan Mak 2002-08-07 20:10:24 UTC
I just tried this. It seems like the pager might not be setting the
flag correctly?

I'll try again tomorrow.