Work around an annoying GTK behaviour I noticed the other day on my
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Nov 2012 20:05:27 +0000 (20:05 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Nov 2012 20:05:27 +0000 (20:05 +0000)
commit8f32c9e8976417d6040cd48359e999a1e4a3a998
tree7a5fcfcf4e45b6d9adf844d0c388cb2f38232b3d
parentecf5542e8790a5ed2a77d7e50bd62fdb91d59d1d
Work around an annoying GTK behaviour I noticed the other day on my
Ubuntu 12.04 machine. What seems to happen is that we set up a window
containing a menu bar, a drawing area and a status bar, and set the
size of the drawing area; then the window is displayed _without_ the
menu bar; then we reduce the drawing area's size request to (1,1) to
let the user resize the window smaller; and now GTK gets round to
constructing the menu bar, and the drawing area helpfully shrinks a
bit to make room for it.

My fix is to set a 'shrink pending' flag instead of shrinking the
drawing area's size request, and defer the actual shrink operation
until the menu bar and status bar are both present.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9711 cda61777-01e9-0310-a592-d414129be87e
gtk.c