1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-28 23:34:49 -05:00

GTK: fix calculation of fixed window size for SUPDUP.

The window size set in the geometry hints when the backend has the
BACKEND_RESIZE_FORBIDDEN flag was computed in a simplistic way that
forgot to take account of window furniture like scrollbars and menu
bars. Now it's computed based on the rest of the geometry hints, which
are more accurate.
This commit is contained in:
Simon Tatham 2021-12-20 10:18:38 +00:00
parent f780a45c57
commit 18a3a999f6

View File

@ -4500,8 +4500,8 @@ void set_geom_hints(GtkFrontend *inst)
if (vt && vt->flags & BACKEND_RESIZE_FORBIDDEN) {
/* Window resizing forbidden. Set both minimum and maximum
* dimensions to be the initial size. */
geom.min_width = inst->width*inst->font_width + 2*inst->window_border;
geom.min_height = inst->height*inst->font_height + 2*inst->window_border;
geom.min_width = geom.base_width + geom.width_inc * inst->width;
geom.min_height = geom.base_height + geom.height_inc * inst->height;
geom.max_width = geom.min_width;
geom.max_height = geom.min_height;
flags |= GDK_HINT_MAX_SIZE;