[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it
From: |
Ihor Radchenko |
Subject: |
bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't |
Date: |
Sun, 08 Dec 2019 12:41:21 +0800 |
> 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
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);
martin rudalics <rudalics@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
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, (continued)
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/15
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, martin rudalics, 2019/12/15
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/15
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, martin rudalics, 2019/12/16
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, mituharu, 2019/12/16
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/16
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Eli Zaretskii, 2019/12/16
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/16
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, YAMAMOTO Mitsuharu, 2019/12/17
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/17
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't,
Ihor Radchenko <=
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, martin rudalics, 2019/12/08
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/08
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, martin rudalics, 2019/12/09
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/09
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, martin rudalics, 2019/12/09
- bug#38497: 27.0.50; Frame is not rendered when frame-resize-pixelwise it 't, Ihor Radchenko, 2019/12/13