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 160977 - Fix tasklist sizing behaviour (another one...)
Fix tasklist sizing behaviour (another one...)
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: tasklist
git master
Other Linux
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
: 149804 164348 165084 165399 166599 166858 169240 169402 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-12-10 20:07 UTC by Vincent Noel
Modified: 2005-07-18 21:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preliminary fix to squished tasklist buttons (6.63 KB, patch)
2005-02-23 07:17 UTC, Nathan Holstein
none Details | Review
patch number two (9.84 KB, patch)
2005-02-25 12:24 UTC, Nathan Holstein
needs-work Details | Review
The stupide simple patche :-) (921 bytes, patch)
2005-02-26 21:05 UTC, Vincent Untz
rejected Details | Review
Patch that works (2.13 KB, patch)
2005-02-27 10:51 UTC, Vincent Untz
needs-work Details | Review

Description Vincent Noel 2004-12-10 20:07:34 UTC
Since this recent changes in libwnck :

2004-12-03  Benjamin Kahn  <xkahn@novell.com>
 
        * When a window title is too long to fit in the space provided,
        it should be shortened and ellipsizes should be shown.
        Fix for bug #155868

Buttons in the window list applet are always very small. It's like the window
list applet did not use all the available space. It's very annoying as it makes
it impossible to distinguish windows with similar icons.
Comment 1 Vincent Noel 2004-12-10 20:09:01 UTC
See comment 11 and comment 12 in bug 155868 for a screenshot of this new problem.
Comment 2 Benjamin Kahn 2004-12-10 20:18:26 UTC
The solution is here: http://bugzilla.gnome.org/attachment.cgi?id=32784&action=view

from bug 155870

It simply needs to be approved by Havoc.
Comment 3 Vincent Noel 2004-12-10 20:24:42 UTC
Well this patch would indeed fix this bug as a side-effect.
And I agree that fixed-size buttons in the window list would be nice...
Comment 4 Vincent Noel 2004-12-22 16:05:39 UTC
This gets even worse if you decide to group the windows when space is limited.
Space is not limited, but the window list applet thinks it is, so it groups
windows into very small buttons. The tasklist applet is basically unusable with
libwnck 2.9.3 because of this bug.
Comment 5 Vincent Untz 2005-01-17 13:37:57 UTC
*** Bug 164348 has been marked as a duplicate of this bug. ***
Comment 6 Vincent Noel 2005-01-24 18:35:27 UTC
*** Bug 165084 has been marked as a duplicate of this bug. ***
Comment 7 Vincent Noel 2005-01-24 18:36:05 UTC
How is this bug different from bug #125023 ?
Comment 8 Elijah Newren 2005-01-24 18:46:20 UTC
I believe bug 125023, bug 155870, and this bug are all duplicates, but I'm not
entirely certain.  Part of the problem is that 125023 and 155870 have different
patches, and we probably don't want to lose them...   *shrug*
Comment 9 Vincent Noel 2005-01-25 16:19:28 UTC
Elijah : do you think this could be set as a 2.10 showstopper ? 
The window list applet (which is very widely used) is unusable because of this bug.
Comment 10 Vincent Noel 2005-01-25 16:22:02 UTC
(or at least set the "minimum size" of the button in the preference panel to
something sensible, like 400 or 500 pixels...)
Comment 11 Elijah Newren 2005-01-25 16:29:51 UTC
Sure, we _can_ do that.  Though I'm thinking Luis or Andrew are going to thwack
me for it.  ;-)
Comment 12 Vincent Untz 2005-01-27 17:01:02 UTC
*** Bug 165399 has been marked as a duplicate of this bug. ***
Comment 13 Vincent Noel 2005-01-28 15:02:08 UTC
Moving to the right component. Sorry for the spam.
Comment 14 Vincent Noel 2005-01-28 18:26:47 UTC
*** Bug 149804 has been marked as a duplicate of this bug. ***
Comment 15 Kjartan Maraas 2005-01-31 09:42:11 UTC
Setting as NEW. We've confirmed this to death a long time ago :-)
Comment 16 Vincent Untz 2005-02-07 20:30:05 UTC
*** Bug 166599 has been marked as a duplicate of this bug. ***
Comment 17 Olav Vitters 2005-02-09 22:09:31 UTC
*** Bug 166858 has been marked as a duplicate of this bug. ***
Comment 18 Luis Villa 2005-02-09 22:13:11 UTC
Nope, this is totally a showstopper- after you've launched more than one
application, it is the first bug you see in GNOME...
Comment 19 Nathan Holstein 2005-02-23 07:17:32 UTC
Created attachment 37823 [details] [review]
preliminary fix to squished tasklist buttons

My take on this bug: one function, wnck_tasklist_layout(), performs two
different tasks, one called from wnck_tasklist_size_request() and the other
from wnck_tasklist_size_allocate().  This patch simply splits
wnck_tasklist_layout into two different functions, one to ask for a desired
size, and one which allocates the given size (essentially what
wnck_tasklist_layout() did previously).
A couple issues, first wnck_tasklist_request_layout() could ask for a smaller
size, see the comment in the code.
Secondly, there seems to be a regression when
grouping==WNCK_TASKLIST_AUTO_GROUP and there are apps which could be grouped
together.  It seems _request() groups them and thus asks for less space than
needed, but _allocate() does not actually group them.  Thus, we get squished
buttons again.	Once they are grouped, it displays correctly.  I'm working on a
patch to fix this, but it will be more complicated.  Still, it acts nicer than
before.
Comment 20 Vincent Untz 2005-02-24 12:22:57 UTC
Let's finally look at this!

Nathan: the reason we use only one function for the request and the allocation
is because we want to request only what we need, and not more. And to see what
we need, we try to find a layout.
I can not try your patch right now, but it seems to me you're requesting too
much space.

I looked at the patch in bug #155870 and at my (old) patch in bug #125023...
Havoc's comment in bug #155870 about font size is correct. My old patch needs
some love and cruft removal.

I'll try to update my old patch and see if it really solves the problem... I'm
not sure it's the right approach, but at least I'll get to know the code again :-)
Comment 21 Nathan Holstein 2005-02-25 12:24:58 UTC
Created attachment 37934 [details] [review]
patch number two

gah it's early in the morning, and I've been playing with this entirely too
long, so there are bits in the patch that can't be pretty.  That said:

  o  I discovered gtk_widget_get_size_request(), it actually had been used at
one point then commented out.  Solves the problem when the tasklist requests
far too much space.  (At least vertically, more on that later.)
  o  I still believe that wnck_tasklist_layout() is used in two fundamentally
different ways, thus it should be split into two functions (my code does this,
there is some duplicate code that could be a procedure).
  o  wnck_tasklist_size_request() needs to do different things depending upon
grouping (ALWAYS vs AUTO).  I did this by copying the while loop, changing it
to an if block, and stripping any of the looping code.	It's a kludge, it seems
to work when everything else I tried didn't.  I don't know why.
  o  gtk_label_set_width_chars() is a beautiful function.  By using it I
believe it's possible to obsolete setting minimum/maximum widths entirely. 
Without it, max_button_width is far too small, which might have been the root
of our problems to begin with.

And now the bad news: because gtk_widget_get_size_request() returns -1 for the
width, my tasklist does not limit it's width...at all.	Which shows what might
be a bug in the panel...my notification area, clock, etc. are pushed off the
right side of the screen when there are sufficient open windows.  If the
requisition width is artifially limited then the panel returns to normal. 
Whose responsibility is it to crop the tasklist?  Shouldn't the panel do this,
and is this a bug to report?
Comment 22 Vincent Untz 2005-02-26 21:05:09 UTC
I found a really stupid simple way to fix the bug without any big change of the
code. Since 2.10 is due really soon, I'd favor this patch to anything else.
Comments welcome.
Comment 23 Vincent Untz 2005-02-26 21:05:39 UTC
Created attachment 37981 [details] [review]
The stupide simple patche :-)
Comment 24 Vincent Untz 2005-02-26 21:10:13 UTC
Note that I should probably s/MAX_CHAR_WIDTH/MAX_WIDTH_CHARS/ ;-)
Comment 25 Elijah Newren 2005-02-26 21:14:58 UTC
It seems to destroy ellipsizing--if a title is too long, it is merely truncated
instead of being ellipsized.
Comment 26 Vincent Untz 2005-02-26 21:29:01 UTC
Good catch.
/me returns to the code.
Comment 27 Vincent Untz 2005-02-27 10:51:09 UTC
Created attachment 37997 [details] [review]
Patch that works

It seems to me the previous patch should work. It indicates there's a bug in
the GtkTable allocation routines.
Comment 28 Vincent Untz 2005-02-27 14:49:04 UTC
Ah, I found how to make it worl with a GtkTable: we just need to add GTK_SHRINK
to the xoptions of the label. Anyway, I don't think we need a GtkTable here :-)
Comment 29 Elijah Newren 2005-02-27 22:48:32 UTC
Sweet!  Seems to work like a charm here.  Well, there is the problem that the
right bracket on minimized windows is missing (it gets ellipsized with
everything else), but I believe that was a bug that existed before anyway...
Comment 30 Vincent Untz 2005-02-28 07:33:45 UTC
I committed my patch. I'll leave the bug open, though, so we don't lose Nathan's
patches.

Maybe we should open a new bug and move the patches from this bug, bug #155870
and bug #125023 there?

(this bug is not a 2.10 showstopper anymore)
Comment 31 Olav Vitters 2005-03-04 21:03:05 UTC
*** Bug 169240 has been marked as a duplicate of this bug. ***
Comment 32 Elijah Newren 2005-03-04 21:58:51 UTC
Vincent: yeah, I think it makes sense to open a new bug since there are two
different issues anyway.  (For those who are following this and other bugs, the
issue fixed here was that taskbuttons would shrink themselves to be much shorter
than the title length even when there was sufficient space; the remaining bug is
that the length of all taskbuttons are dependent on the length of the longest
title when there is sufficient space to display all titles)
Comment 33 Sebastien Bacher 2005-07-10 13:57:27 UTC
*** Bug 169402 has been marked as a duplicate of this bug. ***
Comment 34 Elijah Newren 2005-07-18 21:57:10 UTC
Consolidating as per comment 30; see bug 310809.  Also, attachment 37394 [details] doesn't
apply cleanly anymore so I'll update it's state while I'm at it, but please put
any updates in 310809 since we're moving the remainder of this bug over there.

Marking this bug as fixed, as Vincent fixed the buttons-are-always-super-tiny issue.