Subject: Re: bug#23144: shrinking windows with gtk 3.20

From: martin rudalics <[email-masked]>
Date: Sat, 02 Apr 2016 18:06:16 +0200

> We would prefer to not include the change in Emacs 25.1 (that will be
 > released from the emacs-25 branch), and instead have some workaround
 > there that will be activated by the end-users, if and when they see
 > problems related to this.  Can you propose such a workaround?
 > Something like a call to xg_frame_resized with some reasonable
 > dimensions, for example?

In emacs-25 either use something like

#if !GTK_CHECK_VERSION (3, 20, 0))
           xg_frame_resized (f, -1, -1);
#endif

or, as Matthias proposed, in xg_frame_resized write

   if (pixelwidth == -1 && pixelheight == -1)
     {
       if (FRAME_GTK_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_WIDGET (f)))
	{
	  gdk_window_get_geometry (gtk_widget_get_window (FRAME_GTK_WIDGET (f)),
				   0, 0, &pixelwidth, &pixelheight);
	  if (pixelwidth <= 1 || pixelheight <= 1)
	    return;
	}
       else
	return;
     }

martin