GNU bug report logs -
#38497
27.0.50; Frame is not rendered when frame-resize-pixelwise it 't
Previous Next
Reported by: 'Ihor Radchenko' <yantar92 <at> gmail.com>
Date: Thu, 5 Dec 2019 07:11:02 UTC
Severity: normal
Found in version 27.0.50
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 38497 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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?
It makes no difference.
> ... 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.
Not sure how to get those.
Anyway, the problem does not seem to be related to the code above.
> 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?
Actually, this piece of code seems to be a more specific reason
triggering the bug (see the relevant patch attached - that patch makes
the bug disappear).
I tried your suggestion (no idea how it is different from original code
though). It makes no difference.
A possible hint to why this code fails to resize the frame is that my
WM resizes the frame as soon as it is created. It is not a gradual
resizing with mouse, but rather instant resize to pre-calculated size
(according to layout). I can sometimes even see the frame being created
with much smaller size for a split second followed by resizing it to
target size.
Best,
Ihor
[widget-ignore-pixelwise-6.patch (text/x-diff, inline)]
diff --git a/src/widget.c b/src/widget.c
index e8eaf0fadf..4c00e35333 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -315,8 +315,8 @@ update_wm_hints (EmacsFrame ew)
XtVaSetValues (wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
+ XtNwidthInc, (XtArgVal) (cw),
+ XtNheightInc, (XtArgVal) (ch),
XtNminWidth, (XtArgVal) base_width,
XtNminHeight, (XtArgVal) base_height,
NULL);
[Message part 3 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:
> > 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
This bug report was last modified 5 years and 139 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.