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 765676 - gtk_paned_set_position doesn't work as advertised
gtk_paned_set_position doesn't work as advertised
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.20.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-27 15:21 UTC by Morten Welinder
Modified: 2016-05-02 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2016-04-27 15:21:46 UTC
Documentation says...

 * Sets the position of the divider between the two panes.

..but that's not what the code does.

Specifically this function does nothing if the would-be size being set
is identical to the current size.

In particular, the code will not set position-set in that situation, so
to really make sure the position is set, one has to resort to code like

   gtk_paned_set_position (p, pos - 1);
   gtk_paned_set_position (p, pos);
Comment 1 Matthias Clasen 2016-05-02 02:14:42 UTC
Somewhat ironically, the early return in this function was added in response to a bug you filed in 2010: bug 561816
Comment 2 Morten Welinder 2016-05-02 11:41:35 UTC
2008, but yes.  I work with LTS distributions, so I generally work around
problems instead of waiting for fixes that won't arrive through the
distribution for years.