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 399336 - Scrolled window/viewport doesn't shrink correctly
Scrolled window/viewport doesn't shrink correctly
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-01-22 10:50 UTC by Ross Burton
Modified: 2015-04-20 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (3.19 KB, text/plain)
2007-03-01 18:54 UTC, Miguel Gomez
Details

Description Ross Burton 2007-01-22 10:50:24 UTC
I have a GtkWindow which contains a GtkScrolledWindow which contains a GtkViewport which contains a custom widget.  The scrolled window is set to never show a horizonal scrollbar and always show a vertical scrollbar.  My custom widget prints the size of the allocation is receives in size_allocate.

If I resize the window the custom widget recieves larger and larger allocations, as is expected.  However, when I shrink the window again, I'd expect the allocated width to shrink as there is no way of scrolling horizonally.  Currently if I expand and then shrink the window, some of the content is outside of the visible area and cannot be reached.
Comment 1 Miguel Gomez 2007-03-01 17:50:39 UTC
Added to CC list.
Comment 2 Miguel Gomez 2007-03-01 18:54:37 UTC
Created attachment 83667 [details]
Testcase

Hi!!!

I've been trying to reproduce this behaviour, but I'm not able to do it. I'm using this example (gtkscrolledwindow example with little modifications) but it works fine for me.

The example creates a window, puts a scrolled window insise, a viewport inside the window and then a gtktable inside the viewport. The scrolled window has GTK_POLICY_NEVER as the policy to show the hscrollbar and GTK_POLICY_ALWAYS as the policy to show the vscrollbar.

Once executed, if you make the window larger, the gtktable inside grows, as you say. But when you shrink the window, the gtktable shrinks too, as it should, to correctly fit into the new size.
Debugging the test, I checked that the allocation values sent to the gtktable are always correct.
The only way I found to get a behaviour like the one you explain was forcing to the table a minimum size, so the table doesn't shrink below it. That way, if you shrink the window enough, the table won't shrink and some of its contents will be out of the visible area, but this is what should happen.

Could you, please, post the code you are using to try to reproduce the bug? It will be very useful to me. Thanks in advance :)

Greetings.
Comment 3 Ross Burton 2007-03-02 10:32:00 UTC
Annoyingly I can't replicate this any more but I do have a different bug instead...

Basically sometimes when I shrink the table it gets the size of the children wrong.  I have a feeling that this is weird interaction with my code so will attempt to debug it.
Comment 4 Miguel Gomez 2007-03-02 13:07:02 UTC
Ok, I'm waiting for your debug.

Tell me if you need help :)
Comment 5 Christoph Wurm 2009-01-19 19:09:49 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 6 Joël Krähemann 2015-04-20 13:11:13 UTC
Take a look at http://gsequencer.org/downloads/ags-0_4_2-50.tar.bz2 it seems to be a problem with GtkScrollbar, think so :)

Yes, it is outside of the area.
Comment 7 Joël Krähemann 2015-04-20 13:13:58 UTC
bash-4.3$ cat /usr/lib/pkgconfig/gtk+-2.0.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11

gtk_binary_version=2.10.0
gtk_host=x86_64-unknown-linux-gnu

Name: GTK+
Description: GTK+ Graphical UI Library (${target} target)
Version: 2.24.25
Requires: gdk-${target}-2.0 atk cairo gdk-pixbuf-2.0 gio-2.0 pangoft2
Libs: -L${libdir} -lgtk-${target}-2.0 
Cflags: -I${includedir}/gtk-2.0
Comment 8 Emmanuele Bassi (:ebassi) 2015-04-20 13:16:00 UTC
It's highly unlikely that an 8 year old bug is going to be looked at. It's even less likely that it's going to be looked at through a full application.

Please, open a new bug describing the exact issue, and attach a small, self-contained test case that exhibits the issue.
Comment 9 Joël Krähemann 2015-04-20 13:32:42 UTC
If would compile and start you see it for sure. But me doing a test-case for you. Do you have a sample test case me could adopt? Since me don't have experience to do it in C but me did it in Java with Selenium and Arquillian. Does something alike exist for Gtk+-2.0?

If you don't believe:

./configure
make ags
./ags