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 659241 - GtkPaned initially allocates space for separator, even if there is only one child
GtkPaned initially allocates space for separator, even if there is only one c...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-09-16 13:09 UTC by Chris Coulson
Modified: 2011-09-19 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
no-separator-for-single-child-paned.patch (1.17 KB, patch)
2011-09-16 13:10 UTC, Chris Coulson
accepted-commit_now Details | Review

Description Chris Coulson 2011-09-16 13:09:08 UTC
This was reported at https://launchpad.net/bugs/804435

Basically, when Nautilus loads the wallpaper at session start, it briefly appears offset to the right by a few pixels with an empty bar down the left-hand side of the desktop, before being moved to it's final position (yes, we still use Nautilus to draw the desktop in Ubuntu :/ )

This is happening because gtk_paned_create_child_window always creates the child window for its right-hand pane in the position that would be expected if it were going to draw the separator - even though in this case, the left-hand pane is empty (the Nautilus desktop window doesn't add the sidebar to it) so the separator should not appear.

Then, when gtk_paned_size_allocate gets called again later on, it repositions its only child window (in the right-hand pane) in to the correct place - at allocation->x, allocation->y, with no offset to account for the separator
Comment 1 Chris Coulson 2011-09-16 13:10:38 UTC
Created attachment 196717 [details] [review]
no-separator-for-single-child-paned.patch

This seems to fix it, by initially creating the child window at the correct place
Comment 2 Matthias Clasen 2011-09-17 17:44:33 UTC
Review of attachment 196717 [details] [review]:

Looks right to me, thanks.
Comment 3 Chris Coulson 2011-09-19 11:37:16 UTC
Thanks, I've pushed this now

commit 22cd009ef7ae24011aa3c8414c44361133c93d2c
Author: Chris Coulson <chris.coulson@canonical.com>
Date:   Mon Sep 19 12:28:59 2011 +0100

    GtkPaned: Create the child window at the correct position
    
    When there is only a single child, create its window at the correct position
    https://bugzilla.gnome.org/show_bug.cgi?id=659241