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 698660 - GtkGrid layout broken in 3.9
GtkGrid layout broken in 3.9
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-04-23 14:07 UTC by Adam Dingle
Modified: 2013-04-28 23:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (64.60 KB, image/png)
2013-04-23 14:07 UTC, Adam Dingle
Details

Description Adam Dingle 2013-04-23 14:07:00 UTC
Created attachment 242227 [details]
screenshot

When I run Gnumeric with GTK 3.9 (unreleased; currently available only in GTK git master), the Gnumeric window appears mostly empty: all rows and columns are squeezed into an area in the lower right quarter of the window.  I'll attach a screenshot.
Comment 1 Andreas J. Guelzow 2013-04-23 14:25:45 UTC
I think it is a save bet that that is a GTK bug or change of behaviour.
Comment 2 Andreas J. Guelzow 2013-04-23 14:27:20 UTC
It doesn't look like there is any menu or scroll bars either...
Comment 3 Adam Dingle 2013-04-23 14:36:18 UTC
There's no menu in the screenshot since I'm running Ubuntu Unity, which puts the menu into the menu bar at the top of the display (and hence outside this screenshot).  There are scrollbars in the screenshot, though you may not recognize them at first if you're used to a different theme.

I agree that this is quite possibly a GTK bug.  (It could conceivably be related to bug 698656, which is vaguely similar.)
Comment 4 Jean Bréfort 2013-04-23 16:28:11 UTC
It's most probably a bug in GtkGrid code. The children have the same width and height in the screenshot which should not be the case.
Comment 5 Morten Welinder 2013-04-23 19:53:22 UTC
How recent is your gtk+?

15:52 < Company> gmorten: and I could imagine that the changes for 
                 client-side decrations that mclasen reverted 2 days ago 
                 could've caused sth like that
Comment 6 Adam Dingle 2013-04-23 20:03:32 UTC
When I filed this bug I had pulled and built GTK from git master within the last day.  I just pulled the very latest GTK sources and rebuilt, and with them this bug still occurs.
Comment 7 Morten Welinder 2013-04-23 23:15:09 UTC
This has the feel of a bug in the gtk+ development series.

Tentatively tossing to gtk+.  Feel free to toss it back if there are any
indications that we're to blame.
Comment 8 Adam Dingle 2013-04-24 16:21:38 UTC
I bisected this.  It broke here:

https://git.gnome.org/browse/gtk+/commit/?id=5e1a06d1b124f09a1a54d5ae0f38905dbdc2cc81

commit 5e1a06d1b124f09a1a54d5ae0f38905dbdc2cc81
Author: Matthias Clasen <mclasen@redhat.com>
Date:   Fri Mar 15 23:10:39 2013 -0400

    GtkGrid: Tweak size allocation
    
    If there are rows that contain only spanning children,
    our algorithm was unnecessarily distributing extra space
    to the other rows, even if they contain only non-expanding
    children.
    
    We improve the behaviour by treating rows containing only
    spanning children as expanding.
Comment 9 Morten Welinder 2013-04-27 17:21:07 UTC
Any hope of getting this reverted?

We have 8 children of the grid, like this:

-7-41
65-41
----1
33-21
0000-



Child #0
  Attached at (0,4) with size 4x1
  hexpand: 1; hexpand-set: 1
  vexpand: 0; vexpand-set: 0
  Visible: yes

Child #1
  Attached at (4,0) with size 1x4
  hexpand: 0; hexpand-set: 0
  vexpand: 1; vexpand-set: 1
  Visible: yes

Child #2
  Attached at (3,3) with size 1x1
  hexpand: 1; hexpand-set: 1
  vexpand: 1; vexpand-set: 1
  Visible: yes

Child #3
  Attached at (0,3) with size 2x1
  hexpand: 0; hexpand-set: 0
  vexpand: 0; vexpand-set: 0
  Visible: yes

Child #4
  Attached at (3,0) with size 1x2
  hexpand: 0; hexpand-set: 0
  vexpand: 0; vexpand-set: 0
  Visible: yes

Child #5
  Attached at (1,1) with size 1x1
  hexpand: 0; hexpand-set: 0
  vexpand: 0; vexpand-set: 0
  Visible: yes

Child #6
  Attached at (0,1) with size 1x1
  hexpand: 0; hexpand-set: 0
  vexpand: 0; vexpand-set: 0
  Visible: yes

Child #7
  Attached at (1,0) with size 1x1
  hexpand: 0; hexpand-set: 0
  vexpand: 0; vexpand-set: 0
  Visible: yes
Comment 10 Matthias Clasen 2013-04-28 21:56:34 UTC
Why not attach a testcase - that would be so much easier than describing the setup at length, and expecting me to turn  it into a testcase and take a guess at the expected behavior.
Comment 11 Andreas J. Guelzow 2013-04-28 22:25:55 UTC
But you have a testcase: it is called Gnumeric.
Comment 12 Matthias Clasen 2013-04-28 22:49:20 UTC
Hardly what I would describe as a minimal testcase.
I've pushed one now, and a fix.
Comment 13 Adam Dingle 2013-04-28 23:32:35 UTC
Thanks, Matthias!  I can confirm that Gnumeric looks fine with this update to GTK.