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 587441 - Window expands horizontally rather than the text entry growing vertically when the roomlist is ellipsised
Window expands horizontally rather than the text entry growing vertically whe...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.3.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
: 554514 588772 601423 602243 607543 609254 612143 617271 628023 631591 635021 635902 638066 638561 650301 659540 659657 666525 667772 671762 673553 673982 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-30 16:28 UTC by jorchube
Modified: 2012-04-12 12:35 UTC
See Also:
GNOME target: ---
GNOME version: 3.3/3.4


Attachments
Empathy debug log (16.71 KB, text/plain)
2009-11-10 01:35 UTC, Sumana Harihareswara
  Details
Mockup for empathy ui (1.40 KB, application/x-compressed-tar)
2010-02-21 21:40 UTC, Thomas Meire
  Details
Simple test case (2.93 KB, application/xml)
2010-08-18 10:47 UTC, marcoil
  Details
simple test case program using comment #22's gtkhpaned.ui (637 bytes, text/plain)
2010-12-01 00:03 UTC, Geoffry Song
  Details
fix for current git master (1.98 KB, patch)
2010-12-01 01:29 UTC, Geoffry Song
none Details | Review
Move the input box to the bottom of the chat panel (7.60 KB, patch)
2012-04-05 07:14 UTC, Gaz Davidson
rejected Details | Review
return the user-set size for one pane if that size is smaller than the widget's desired size (2.10 KB, patch)
2012-04-05 08:40 UTC, Guillaume Desmottes
committed Details | Review

Description jorchube 2009-06-30 16:28:17 UTC
in chatrooms, when tiping large text, the entry (and the whole window) resizes horizontally, without limit... it can be larger than the screen.


it happened to me in a jabber chatroom.
in conversations 1-to-1 doesn't happen.
Comment 1 jorchube 2009-06-30 16:36:38 UTC
using:

empathy 2.26.2
libtelepathy 0.3.3
telepathy-gabble 0.7.29 
telepathy-glib 0.7.33
libtelepathy 0.3.3
python-telepathy 0.15.8
telepathy-mission-control 4.67
Comment 2 jorchube 2009-06-30 21:52:34 UTC
wel... it sounds like a joke... after restart the app, it resizes vertically the text entry widget.

i can't reproduce the bug.
Comment 3 jorchube 2009-06-30 22:35:33 UTC
ok, the bug happens if you resize manually the contact list frame in a multichat room.
Comment 4 Will Thompson 2009-08-28 12:52:16 UTC
*** Bug 588772 has been marked as a duplicate of this bug. ***
Comment 5 Will Thompson 2009-08-28 12:55:33 UTC
Yeah, this only seems to happen if at least one entry in the userlist is ellipsized.

I wonder if someone could cook up a simple test case mocking up the Empathy UI:

GtkPaned { GtkVBox { GtkTextView, GtkTextEntry }, GtkTreeView }

so we could see if this is a Gtk bug or a bug in Empathy.
Comment 6 Sumana Harihareswara 2009-11-10 01:32:54 UTC
Still happening in GNOME Version 2.26.1 & Empathy 2.27.92.

repro steps:

Join a chat room.
Manually narrow the contact list so that at least one entry in the user list is truncated & ellipsized.
Type something extremely long into the text entry field.  Keep typing as the window horizontally expands.

Expected result:
Once the window's horizontal length is as long as the screen, make the text entry box expand vertically instead.

Actual result:
Window continues to horizontally expand beyond the width of the screen.
Comment 7 Sumana Harihareswara 2009-11-10 01:35:07 UTC
Created attachment 147346 [details]
Empathy debug log

This Empathy debug log shows me joining the chatroom, resizing the contact list, typing, (I believe) resizing the contact list again, and typing some more to make the window expand further than it should have (horizontally).
Comment 8 Sumana Harihareswara 2009-11-16 00:05:50 UTC
*** Bug 601423 has been marked as a duplicate of this bug. ***
Comment 9 Sumana Harihareswara 2009-11-20 03:38:00 UTC
*** Bug 602243 has been marked as a duplicate of this bug. ***
Comment 10 Sumana Harihareswara 2009-11-29 11:44:54 UTC
*** Bug 554514 has been marked as a duplicate of this bug. ***
Comment 11 Omer Akram 2010-01-17 16:39:24 UTC
this bugs is fixed in empathy 2.29.5 please mark it fixed
Comment 12 Will Thompson 2010-02-01 11:55:16 UTC
This bug is emphatically not fixed in 2.29.6.
Comment 13 Will Thompson 2010-02-01 11:55:41 UTC
*** Bug 607543 has been marked as a duplicate of this bug. ***
Comment 14 Omer Akram 2010-02-20 19:51:31 UTC
This very badly exist in 2.29.90 the window cannot even be resized manually
Comment 15 Thomas Meire 2010-02-21 21:40:56 UTC
Created attachment 154343 [details]
Mockup for empathy ui

The attached file contains a c-file and a gtk-builder file to reconstruct this part of the empathy ui. Everything resizes correctly when typing very long messages with ellipsized strings in the treeview. Seems like the problem is situated in EmpathyContactListView or one of the custom cellrenderers.
Comment 16 Omer Akram 2010-02-28 18:36:07 UTC
This seems to be fixed in 2.29.91
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2010-03-01 08:50:27 UTC
I can confirm this happens in master. I can provide video proof :-).

It seems to happen when the HPane division makes the user list narrower than "X", where X is an unknown value that goes a few pixel over "no name ellipsized".
It's quite a bad bug :-/. I *think* the bug might be in the custom size_request the entry does, iirc it has one.
Comment 18 Guillaume Desmottes 2010-03-08 16:13:34 UTC
*** Bug 612143 has been marked as a duplicate of this bug. ***
Comment 19 Olivier Le Thanh Duong 2010-04-04 00:12:54 UTC
*** Bug 609254 has been marked as a duplicate of this bug. ***
Comment 20 Matěj Cepl 2010-04-14 20:19:06 UTC
(In reply to comment #16)
> This seems to be fixed in 2.29.91

I can quite certainly reproduce it on 2.30.0
Comment 21 Will Thompson 2010-07-28 17:50:44 UTC
*** Bug 617271 has been marked as a duplicate of this bug. ***
Comment 22 marcoil 2010-08-18 10:47:17 UTC
Created attachment 168186 [details]
Simple test case

This test case reproduces the bug with simple Gtk+ widgets, no empathy required.

The bug only appears if the GtkHPaned bar is moved to the right so that the right-most widget's size is smaller than requested (200px).

I've tried tracing the bug and it seems that GtkTextView asks to grow horizontally when that condition is met, but I have no idea why.
Comment 23 Maciej (Matthew) Piechotka 2010-08-18 11:14:22 UTC
Ok. Changing to gtk+
Comment 24 Maciej (Matthew) Piechotka 2010-08-18 11:14:59 UTC
UPS. Wrong component
Comment 25 Maciej (Matthew) Piechotka 2010-08-18 11:26:54 UTC
I am really sorry for:
 - Spamming (3rd comment in row)
 - Changing product. I was sure I'm reporter and I realized I'm not after the change.
Comment 26 Frederic Peters 2010-08-26 10:29:53 UTC
*** Bug 628023 has been marked as a duplicate of this bug. ***
Comment 27 Guillaume Desmottes 2010-10-07 09:28:45 UTC
*** Bug 631591 has been marked as a duplicate of this bug. ***
Comment 28 Juan J. Martinez 2010-10-18 09:04:39 UTC
I'm having the same problem with Empathy 2.32.0.1 (Fedora 14 beta).

When I paste a long text, it doesn't happen (seems related to typing).

I uploaded a video sample of the problem in bug #632357 (not a related bug, but I didn't notice this one, sorry).
Comment 29 jorchube 2010-10-21 21:54:25 UTC
I can confirm that the bug still exists on Empathy 2.32.0.1 (ArchLinux)

I suppose that we are not going to see this fixed until gnome3/gtk3... (well, the wait is not too long xD)
Comment 30 Guillaume Desmottes 2010-11-17 08:05:20 UTC
*** Bug 635021 has been marked as a duplicate of this bug. ***
Comment 31 Paul Sladen 2010-11-27 08:39:28 UTC
*** Bug 635902 has been marked as a duplicate of this bug. ***
Comment 32 Geoffry Song 2010-12-01 00:03:03 UTC
I'm the Google Code-In student working on this bug (http://www.google-melange.com/gci/task/show/google/gci2010/gnome/t128958357029). As part of the task I wrote a trivial test case program that uses comment #22's GtkBuilder file. I also wrote a very simple workaround patch based on the 2.24 git tree, but it isn't quite correct, so I won't attach it here. I'm working on git master now.

Copied from that page:
(me:)
I'm not entirely certain what's going on with the size requests, but it seems that the container doesn't know that GtkTextView doesn't care all that much about its size. As a kind of hacky work-around, I changed gtk_text_view_request_size to always return -1 for width (is this even allowed? should it return 0? or is this completely wrong) and the problem no longer occurs in the test case. Running Pidgin with the modified GTK+ didn't reveal any immediate problems. I also tried reproducing the original bug in Empathy, but it was almost completely broken even without using the modified GTK+; I'm running Fedora Rawhide so that's probably why.

(Johannes Schmid:)
In gtk+ you actually shouldn't have size_request but get_preferred_height and get_preferred_width. And in addition I think that the text-view should care about it's size request in case it doesn't have line-wrap (width) and of course for it's height. You cannot assume that the text-view is always in a scrolled widget.
Comment 33 Geoffry Song 2010-12-01 00:03:54 UTC
Created attachment 175591 [details]
simple test case program using comment #22's gtkhpaned.ui
Comment 34 Geoffry Song 2010-12-01 01:29:38 UTC
Created attachment 175596 [details] [review]
fix for current git master

Here's a real (?) and not hacky fix. It changes GtkPaned's 'preferred size' code to return the user-set size for one pane if that size is smaller than the widget's desired size. This fixes this bug (at least in the test case; I still can't run Empathy). If the text view is changed to not wrap, then typing to fill the box will not cause the window to resize. Regardless of whether this behaviour is good, it is more consistent than the previous behaviour.
Comment 35 WolfRage 2010-12-07 23:04:12 UTC
Also being tracked here: https://bugs.launchpad.net/empathy/+bug/433651
Looking forward to a fix, once I get done with a patch I am currently working on, I plan to add support for more IRC commands. But this bug holds Empathy back from being a serious IRC client.
Comment 36 Guillaume Desmottes 2011-01-10 10:50:21 UTC
*** Bug 638066 has been marked as a duplicate of this bug. ***
Comment 37 Guillaume Desmottes 2011-01-10 12:23:03 UTC
*** Bug 638561 has been marked as a duplicate of this bug. ***
Comment 38 Pacho Ramos 2011-03-06 12:00:07 UTC
(In reply to comment #34)
> Created an attachment (id=175596) [details] [review]
> fix for current git master
> 
> Here's a real (?) and not hacky fix. It changes GtkPaned's 'preferred size'
> code to return the user-set size for one pane if that size is smaller than the
> widget's desired size. This fixes this bug (at least in the test case; I still
> can't run Empathy). If the text view is changed to not wrap, then typing to
> fill the box will not cause the window to resize. Regardless of whether this
> behaviour is good, it is more consistent than the previous behaviour.

Is this patch ok to be committed? We are also suffering this problem on Gentoo:
http://bugs.gentoo.org/show_bug.cgi?id=356359
Comment 39 Frederic Peters 2011-05-16 11:34:44 UTC
*** Bug 650301 has been marked as a duplicate of this bug. ***
Comment 40 Matthias Clasen 2011-06-06 23:38:33 UTC
I think this was probably fixed as a side-effect of implementing hfw for paneds.
Comment 41 Matěj Cepl 2011-06-07 09:00:45 UTC
(In reply to comment #40)
> I think this was probably fixed as a side-effect of implementing hfw for
> paneds.

Actually yes, I cannot reproduce it anymore with empathy-3.0.2-1.fc15.x86_64. I believe this bug can be closed. Reporter, do you object?
Comment 42 Guillaume Desmottes 2011-09-20 08:27:33 UTC
*** Bug 659540 has been marked as a duplicate of this bug. ***
Comment 43 Guillaume Desmottes 2011-09-21 07:43:08 UTC
*** Bug 659657 has been marked as a duplicate of this bug. ***
Comment 44 Ben Guzzardi 2011-10-21 23:40:04 UTC
This bug appears to have resurfaced. I can reproduce the behavior in Empathy 3.2.1 and gtk+ 3.0.0 on Arch Linux.

Steps to reproduce are the same as before; shrink the contact list in an IRC window until nicks are truncated, and then start typing things in the entry box. Entered text does not wrap, but grows the window horizontally.
Comment 45 Misha Shnurapet 2011-10-26 13:51:05 UTC
Reproducible on Fedora 16.

empathy-3.2.1-1.fc16.x86_64
Comment 46 Guillaume Desmottes 2012-01-17 09:48:03 UTC
*** Bug 667772 has been marked as a duplicate of this bug. ***
Comment 47 Guillaume Desmottes 2012-01-18 16:17:22 UTC
*** Bug 666525 has been marked as a duplicate of this bug. ***
Comment 48 Alexandre Magno 2012-01-22 04:19:42 UTC
Reproducible on Ubuntu 11.10.

empathy (3.2.0.1-0ubuntu1.1) oneiric-security; urgency=low
Comment 49 Frederik Elwert 2012-02-05 12:15:27 UTC
Still reproducable with empathy 3.3.4 in Ubuntu 12.04. Any progress on this?
Comment 50 Guillaume Desmottes 2012-03-12 12:14:58 UTC
*** Bug 671762 has been marked as a duplicate of this bug. ***
Comment 51 tao 2012-04-01 09:16:36 UTC
The reason that it's still reproducible in newer versions of empathy is probably because they are linked against gtk3.  This fix has for some strange reason NOT been applied to gtk3...
Comment 52 Guillaume Desmottes 2012-04-05 06:53:38 UTC
*** Bug 673553 has been marked as a duplicate of this bug. ***
Comment 53 Gaz Davidson 2012-04-05 07:13:10 UTC
It's a shame that such a trivial bug has been hanging around and ruining the IRC experience for the best part of 3 years. A really simple but slightly hacky work-around would be to just move the text input bar to the bottom of the empathy-chat.ui

I'm attaching a patch that does just that. I hope you'll consider it, even if it's not an ideal solution.
Comment 54 Gaz Davidson 2012-04-05 07:14:30 UTC
Created attachment 211354 [details] [review]
Move the input box to the bottom of the chat panel
Comment 55 Guillaume Desmottes 2012-04-05 08:34:53 UTC
Thanks for the patch but we can't merge it for 3.4 anyway as that would be an UI change. I really prefer to have this fixed properly in Gtk+ so I'm goint to rebase the patch from Comment 34
Comment 56 Guillaume Desmottes 2012-04-05 08:40:05 UTC
Created attachment 211358 [details] [review]
return the user-set size for one pane if that size is smaller than the widget's desired size
Comment 57 Guillaume Desmottes 2012-04-05 08:40:48 UTC
(In reply to comment #56)
> Created an attachment (id=211358) [details] [review]
> return the user-set size for one pane if that size is smaller than the widget's
> desired size

This is really Geoffry's patch. I just rebased it on top of current master and tested it was actually fixing the Empathy issue.
Comment 58 Guillaume Desmottes 2012-04-05 08:48:38 UTC
This bug is really easy to test/reproduce. Just use the test case from Comment  33 and Comment 22
Comment 59 Guillaume Desmottes 2012-04-05 09:32:13 UTC
I discussed this with Benjamin on IRC who kindly provided a better patch fixing this issue.

Now fixed in Gtk+ master.
Comment 60 mahfiaz 2012-04-05 13:48:59 UTC
Guillaume, you are the man! I'd give you a candy if you weren't that far :)
That was long awaited, I almost got used to that bug and avoided long lines whenever possible.
Comment 61 Guillaume Desmottes 2012-04-06 06:59:43 UTC
All the credits really belong to Benjamin, he's the one who fixed the bug. I'm just the one who badgered him about it.  :)

For info the fix is:


commit 12d6b0fe6251e77dbda8c3daeefacb028a267750
Author: Benjamin Otte <otte@redhat.com>
Date:   Thu Apr 5 11:30:41 2012 +0200

    paned: Shrinkable widgets don't require a size
    
    This could otherwise lead to very funny size request behaviors, in
    particular in empathy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=587441
Comment 62 Guillaume Desmottes 2012-04-12 12:35:43 UTC
*** Bug 673982 has been marked as a duplicate of this bug. ***