> This makes an obviously visible difference: C-x 5 2 opens a small frame > which immediately becomes large. > > Here's the *frame-size-history* buffer: ... > ConfigureNotify, PS=1328x1260, XS=400x374, DS=1328x1260 > xg_frame_resized, rejected, PS=1328x1260, XS=400x374, DS=664x630 > tool-bar-lines (2), MS=160x175 > xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1260 > ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1260 > xg_frame_resized, rejected, PS=1328x1260, XS=1328x1258, DS=664x671 > set_window_configuration (4), MS=160x175 IH IV > > Note that once more I retained the simple patch to frame.c to set > frame-size-history to (100). Setting 'frame-size-history' to '(100), doing C-x 5 2 and evaluating 'frame--size-history' should be enough. The frame.c change is needed only for the initial frame because at that time no Lisp was evaluated. The result is not yet what I hoped for. We reject two ConfigureNotify events but the ensuing xg_frame_set_char_size calls do not get us a ConfigureNotify we'd accept. IIUC the final height may be off by two pixels. What does (frame-text-height) return for the first and the second frame? Also I hope you didn't get the GTK assertion failure. And how does removing the menubar behave? Now something completely different. A couple of years ago I noticed that our size hints calculations are fundamentally wrong. I tried to fix them and I attach some parts of that fix together with the previous changes I proposed. Attached as size_hints.diff. If the patch does not apply, complain. I edited it by hand to exclude other changes I made and I might have made mistakes. Again I'm interested in the history of the second frame. martin