Subject: bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't

From: martin rudalics <[email-masked]>
Date: Sat, 7 Dec 2019 17:29:57 +0100

> The attached patch is the minimal patch making the rendering issue
 > disappear.

Thank you.

 > Also, I cannot reproduce the issue when I try to configure
 > emacs just with ./configure --with-x-toolkit=lucid. The options I used
 > to compile emacs in my OS (I am using gentoo) are
 >
 > ./configure --prefix=/usr --build=x86_64-pc-linux-gnu
 > --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 > --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 > --localstatedir=/var/lib --disable-silent-rules
 > --docdir=/usr/share/doc/emacs-vcs-27.0.9999
 > --htmldir=/usr/share/doc/emacs-vcs-27.0.9999/html --libdir=/usr/lib64
 > --program-suffix=-emacs-27-vcs --includedir=/usr/include/emacs-27-vcs
 > --infodir=/usr/share/info/emacs-27-vcs --localstatedir=/var
 > --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 > --without-compress-install --without-hesiod --without-pop
 > --with-dumping=pdumper --with-file-notification=inotify --enable-acl
 > --with-dbus --with-modules --without-gameuser --with-libgmp --with-gpm
 > --without-json --without-kerberos --without-kerberos5 --with-lcms2
 > --with-xml2 --without-mailutils --without-selinux --with-gnutls
 > --without-libsystemd --with-threads --without-wide-int --with-zlib
 > --with-sound=alsa --with-x --without-ns --without-gconf
 > --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg
 > --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick
 > --with-xft --with-cairo --without-harfbuzz --without-libotf

Is it a good idea to build with xft _and_ cairo?  And what's bad
about libotf?

 > --without-m17n-flt --with-x-toolkit=lucid --with-xaw3d

-  ew->core.width = (frame_resize_pixelwise
-		    ? FRAME_PIXEL_WIDTH (f)
-		    : pixel_width);
-  ew->core.height = (frame_resize_pixelwise
-		     ? FRAME_PIXEL_HEIGHT (f)
-		     : pixel_height);
+  ew->core.width = (pixel_width);
+  ew->core.height = (pixel_height);

Maybe a conversion problem.  Does

   ew->core.width = (frame_resize_pixelwise
		    ? (Dimension) FRAME_PIXEL_WIDTH (f)
		    : pixel_width);
   ew->core.height = (frame_resize_pixelwise
		     ? (Dimension) FRAME_PIXEL_HEIGHT (f)
		     : pixel_height);

yield better results?  If not, can you tell me the four values here
when it fails to redraw - that of FRAME_PIXEL_WIDTH (f), pixel_width,
FRAME_PIXEL_HEIGHT (f) and pixel_height.

This one

-		 XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
-		 XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
+		 XtNwidthInc, (XtArgVal) (cw),
+		 XtNheightInc, (XtArgVal) (ch),

is more mysterious.  Why should 1 fail here?  What happens when you do

   cw = frame_resize_pixelwise ? 1 : cw;
   ch = frame_resize_pixelwise ? 1 : ch;
   XtVaSetValues (wmshell,
		 XtNbaseWidth, (XtArgVal) base_width,
		 XtNbaseHeight, (XtArgVal) base_height,
		 XtNwidthInc, (XtArgVal) cw,
		 XtNheightInc, (XtArgVal) ch,
		 XtNminWidth, (XtArgVal) base_width,
		 XtNminHeight, (XtArgVal) base_height,
		 NULL);

instead?

martin