From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs 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 Message-ID: <87muc3bf9q.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> References: <87wobbjlm0.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <7caf72bb-1dc0-6e6d-430a-5c28295fb80c@gmx.at> <87tv6fjco6.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <20b3b02b-8018-49cd-4ab3-702ccf9e1c28@gmx.at> <87d0d0i7hk.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <25861c90-bdb5-e873-7da7-22a8d997f4b6@gmx.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="223736"; mail-complaints-to="usenet@blaine.gmane.org" To: martin rudalics , 38497@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 08 05:44:31 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1idoQp-000w4Q-I9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Dec 2019 05:44:31 +0100 Original-Received: from localhost ([::1]:55666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idoQn-0002Hh-Nj for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Dec 2019 23:44:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47577) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idoQP-0002HT-Ly for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2019 23:44:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idoQN-0001nA-IU for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2019 23:44:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44340) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idoQL-0001lk-W8 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2019 23:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1idoQL-0006ku-Tl for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2019 23:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Dec 2019 04:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38497 X-GNU-PR-Package: emacs Original-Received: via spool by 38497-submit@debbugs.gnu.org id=B38497.157578020225901 (code B ref 38497); Sun, 08 Dec 2019 04:44:01 +0000 Original-Received: (at 38497) by debbugs.gnu.org; 8 Dec 2019 04:43:22 +0000 Original-Received: from localhost ([127.0.0.1]:50313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idoPh-0006jh-JE for submit@debbugs.gnu.org; Sat, 07 Dec 2019 23:43:21 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:38394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idoPe-0006jT-Tu for 38497@debbugs.gnu.org; Sat, 07 Dec 2019 23:43:19 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id y17so12251079wrh.5 for <38497@debbugs.gnu.org>; Sat, 07 Dec 2019 20:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=bx7tnQs3Gb6+k5KQDhLhKLP1WyEacul+/XkdtrdKas8=; b=SspYWoVYtaaO1gPD6lq7e3S7cjhxwayHhq+P2cmQXAPuOgY9M5UulyR9viDmKr5ko8 FIAyLUkFlikWGksSy6rxdDLl8Tdd22BK2GpCFJ/tFeySGSiVSOgf0vJIWOpyHTNSzaQB /wlo8V7wvVaI1V0iC/JhsnpaOUwlPKYDmA+wlolI9IpV+31fs95AI8DxeC4QSr9AVfUk UDvl+/yB7OlqnrYHDsD33D5ljUvfmLBeXv24S0l0F8XdiclWDDfiLat/wbF6IQS1Efvy Y3XyoezXUocotBLvbSI28nstFmqPDe+jzdieS8uv3frUgXTtaby1e7d4myM3iVgnFmTU py5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=bx7tnQs3Gb6+k5KQDhLhKLP1WyEacul+/XkdtrdKas8=; b=XUu1WOZDaBd+7iZQsHXMBkxNfY5R/9bSdGl0kirjiH6PGkuSxq/UBr9NNOdihd66Rx A/wbQz+wCqTJvk9cL7TGNUq3OOPN4ySnsRO+Cjqga5sgDXXpr6KSVv3DW+OG7AOhbXRT 05p1XxS21/newVgD0DyXZAzMRoq7RL9lYM1TM/E6pgMJGQc+jH0AclxxZ4ea4hF2CcGN Bh7JWG2nf0wskdyX0SKlrhCumfpYfC9Fe+2E0tcTlQ8aeoBGbJH3u44Esm8Acv/VklNq fUqeO2WWs3+OCWIriSvNpcKwC+1WRKt97cqBuBPoSbvl3nY1vhqAjCFYactO64N16tgC rSKA== X-Gm-Message-State: APjAAAV0jPp/lpeOVy1ZbxhgoKbU2RU3nmUEhlMYe1/jrYqjzGShhJRW fApULdU+ByOf7CcOdfZ2FFp8ePgaKpI= X-Google-Smtp-Source: APXvYqwobhShwG+1PL/Aufe2lh02WpQl5m/aso3XiaPYjbEXsXZYRi3k7p34gJZsn3Yr/+7Xrv76xw== X-Received: by 2002:adf:f803:: with SMTP id s3mr23237794wrp.7.1575780192953; Sat, 07 Dec 2019 20:43:12 -0800 (PST) Original-Received: from localhost ([5.226.137.4]) by smtp.gmail.com with ESMTPSA id s16sm22104870wrn.78.2019.12.07.20.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2019 20:43:12 -0800 (PST) In-Reply-To: <25861c90-bdb5-e873-7da7-22a8d997f4b6@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173026 Archived-At: --=-=-= Content-Type: text/plain > 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=widget-ignore-pixelwise-6.patch 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); --=-=-= Content-Type: text/plain martin rudalics 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 --=-=-=--