From unknown Fri Jun 20 20:11:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Mar 2014 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17115@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139588816015044 (code B ref -1); Thu, 27 Mar 2014 02:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Mar 2014 02:42:40 +0000 Received: from localhost ([127.0.0.1]:51589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT0H9-0003uZ-7h for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58592) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT0H3-0003uO-MC for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT0Gw-0007Rs-9h for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gw-0007Ro-7Z for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gq-0006uq-5z for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT0Gk-0007Mm-1G for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:20 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:58262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gj-0007Lu-Fr for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:13 -0400 Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id E755DC055D for ; Thu, 27 Mar 2014 11:42:09 +0900 (JST) Date: Thu, 27 Mar 2014 11:42:09 +0900 Message-ID: From: YAMAMOTO Mitsuharu User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Recently I found a bug (which is different from Bug#17114) in drawing images with box on the Mac port, and I suspect it also happens on W32 because their code are similar (though I can't test it). Could someone try if it is reproducible on W32 and if so, please try the patch at the end? Steps to reproduce: 1. $ emacs -Q -D & 2. (insert-image (create-image "splash.png") (propertize " " 'face '(:box (:line-width 5)))) C-j 3. C-p C-p Result: The left half of the character `t' just after the image gets erased. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/w32term.c' *** src/w32term.c 2014-03-26 15:57:13 +0000 --- src/w32term.c 2014-03-27 02:32:46 +0000 *************** *** 2082,2094 **** static void x_draw_image_glyph_string (struct glyph_string *s) { - int x, y; int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); int height; HBITMAP pixmap = 0; ! height = s->height - 2 * box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce --- 2082,2097 ---- static void x_draw_image_glyph_string (struct glyph_string *s) { int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); int height; HBITMAP pixmap = 0; ! height = s->height; ! if (s->slice.y == 0) ! height -= box_line_vwidth; ! if (s->slice.y + s->slice.height >= s->img->height) ! height -= box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce *************** *** 2101,2112 **** || s->img->pixmap == 0 || s->width != s->background_width) { ! x = s->x; if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! x += box_line_hwidth; - y = s->y; if (s->slice.y == 0) y += box_line_vwidth; --- 2104,2120 ---- || s->img->pixmap == 0 || s->width != s->background_width) { ! int x = s->x; ! int y = s->y; ! int width = s->background_width; ! if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! { ! x += box_line_hwidth; ! width -= box_line_hwidth; ! } if (s->slice.y == 0) y += box_line_vwidth; *************** *** 2150,2156 **** } else #endif ! x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); s->background_filled_p = 1; } --- 2158,2164 ---- } else #endif ! x_draw_glyph_string_bg_rect (s, x, y, width, height); s->background_filled_p = 1; } From unknown Fri Jun 20 20:11:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Mar 2014 04:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17115@debbugs.gnu.org Received: via spool by 17115-submit@debbugs.gnu.org id=B17115.139589569928369 (code B ref 17115); Thu, 27 Mar 2014 04:49:02 +0000 Received: (at 17115) by debbugs.gnu.org; 27 Mar 2014 04:48:19 +0000 Received: from localhost ([127.0.0.1]:51642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT2El-0007NV-49 for submit@debbugs.gnu.org; Thu, 27 Mar 2014 00:48:19 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:58055) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT2Eh-0007N9-QS for 17115@debbugs.gnu.org; Thu, 27 Mar 2014 00:48:17 -0400 Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id E9243C055D for <17115@debbugs.gnu.org>; Thu, 27 Mar 2014 13:48:10 +0900 (JST) Date: Thu, 27 Mar 2014 13:48:10 +0900 Message-ID: From: YAMAMOTO Mitsuharu In-Reply-To: References: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) >>>>> On Thu, 27 Mar 2014 11:42:09 +0900, YAMAMOTO Mitsuharu said: > Recently I found a bug (which is different from Bug#17114) in drawing > images with box on the Mac port, and I suspect it also happens on W32 > because their code are similar (though I can't test it). Could > someone try if it is reproducible on W32 and if so, please try the > patch at the end? > Steps to reproduce: > 1. $ emacs -Q -D & > 2. (insert-image (create-image "splash.png") > (propertize " " 'face '(:box (:line-width 5)))) C-j > 3. C-p C-p > Result: > The left half of the character `t' just after the image gets erased. Probably "splash.png" in Step 2 should have been "splash.xpm" on W32 so that s->img->mask != NULL holds. And I managed to reproduce the similar problem also on X11 by replacing Step 2 with: 2'. (insert-image (create-image "splash.png" nil nil :margin 10) (propertize " " 'face '(:box (:line-width 5)))) C-j Below is a patch for X11. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/xterm.c' *** src/xterm.c 2014-03-21 19:04:57 +0000 --- src/xterm.c 2014-03-27 04:34:57 +0000 *************** *** 2402,2416 **** { int x = s->x; int y = s->y; if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! x += box_line_hwidth; if (s->slice.y == 0) y += box_line_vwidth; ! x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); } s->background_filled_p = 1; --- 2402,2420 ---- { int x = s->x; int y = s->y; + int width = s->background_width; if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! { ! x += box_line_hwidth; ! width -= box_line_hwidth; ! } if (s->slice.y == 0) y += box_line_vwidth; ! x_draw_glyph_string_bg_rect (s, x, y, width, height); } s->background_filled_p = 1; From unknown Fri Jun 20 20:11:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Mar 2014 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: YAMAMOTO Mitsuharu Cc: 17115@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 17115-submit@debbugs.gnu.org id=B17115.139593777616821 (code B ref 17115); Thu, 27 Mar 2014 16:30:02 +0000 Received: (at 17115) by debbugs.gnu.org; 27 Mar 2014 16:29:36 +0000 Received: from localhost ([127.0.0.1]:52979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDBP-0004ND-Ai for submit@debbugs.gnu.org; Thu, 27 Mar 2014 12:29:35 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:57805) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDBM-0004N3-DW for 17115@debbugs.gnu.org; Thu, 27 Mar 2014 12:29:33 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N3300100S39XD00@mtaout28.012.net.il> for 17115@debbugs.gnu.org; Thu, 27 Mar 2014 18:29:15 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N33000STSGQWN20@mtaout28.012.net.il>; Thu, 27 Mar 2014 18:29:15 +0200 (IST) Date: Thu, 27 Mar 2014 18:29:29 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83vbuzy592.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 27 Mar 2014 11:42:09 +0900 > From: YAMAMOTO Mitsuharu > > Recently I found a bug (which is different from Bug#17114) in drawing > images with box on the Mac port, and I suspect it also happens on W32 > because their code are similar (though I can't test it). Could > someone try if it is reproducible on W32 and if so, please try the > patch at the end? > > Steps to reproduce: > > 1. $ emacs -Q -D & > 2. (insert-image (create-image "splash.png") > (propertize " " 'face '(:box (:line-width 5)))) C-j > 3. C-p C-p > > Result: > > The left half of the character `t' just after the image gets erased. Confirmed. (And yes, you need to use the XPM image to reproduce the problem; PNG doesn't.) > === modified file 'src/w32term.c' > *** src/w32term.c 2014-03-26 15:57:13 +0000 > --- src/w32term.c 2014-03-27 02:32:46 +0000 Thanks, I installed this with minor changes (to keep the original code style intact). From unknown Fri Jun 20 20:11:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: YAMAMOTO Mitsuharu Subject: bug#17115: closed (Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32) Message-ID: References: X-Gnu-PR-Message: they-closed 17115 X-Gnu-PR-Package: emacs Reply-To: 17115@debbugs.gnu.org Date: Fri, 28 Mar 2014 00:56:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1395968164-25020-1" This is a multi-part message in MIME format... ------------=_1395968164-25020-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17115: 24.3.50; possible bug in drawing images with box on W32 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17115@debbugs.gnu.org. --=20 17115: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17115 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1395968164-25020-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17115-done) by debbugs.gnu.org; 28 Mar 2014 00:55:06 +0000 Received: from localhost ([127.0.0.1]:53394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTL4b-0006UJ-9o for submit@debbugs.gnu.org; Thu, 27 Mar 2014 20:55:06 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:57418) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTL4T-0006Tj-7f for 17115-done@debbugs.gnu.org; Thu, 27 Mar 2014 20:55:03 -0400 Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 125E9C055D; Fri, 28 Mar 2014 09:54:53 +0900 (JST) Date: Fri, 28 Mar 2014 09:54:53 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32 In-Reply-To: <83vbuzy592.fsf@gnu.org> References: <83vbuzy592.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 17115-done Cc: 17115-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Version: 24.4 >>>>> On Thu, 27 Mar 2014 18:29:29 +0200, Eli Zaretskii said: >> Steps to reproduce: >> >> 1. $ emacs -Q -D & >> 2. (insert-image (create-image "splash.png") >> (propertize " " 'face '(:box (:line-width 5)))) C-j >> 3. C-p C-p >> >> Result: >> >> The left half of the character `t' just after the image gets erased. > Confirmed. (And yes, you need to use the XPM image to reproduce the > problem; PNG doesn't.) Thanks for confirming this. >> === modified file 'src/w32term.c' >> *** src/w32term.c 2014-03-26 15:57:13 +0000 >> --- src/w32term.c 2014-03-27 02:32:46 +0000 > Thanks, I installed this with minor changes (to keep the original > code style intact). I moved the variables `x' and `y' to the inner block because that makes the code look more like the corresponding one in xterm.c. Anyway, I've just installed the patch for X11. Closing. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp ------------=_1395968164-25020-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Mar 2014 02:42:40 +0000 Received: from localhost ([127.0.0.1]:51589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT0H9-0003uZ-7h for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58592) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT0H3-0003uO-MC for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT0Gw-0007Rs-9h for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gw-0007Ro-7Z for submit@debbugs.gnu.org; Wed, 26 Mar 2014 22:42:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gq-0006uq-5z for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT0Gk-0007Mm-1G for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:20 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:58262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT0Gj-0007Lu-Fr for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 22:42:13 -0400 Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id E755DC055D for ; Thu, 27 Mar 2014 11:42:09 +0900 (JST) Date: Thu, 27 Mar 2014 11:42:09 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: bug-gnu-emacs@gnu.org Subject: 24.3.50; possible bug in drawing images with box on W32 User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Recently I found a bug (which is different from Bug#17114) in drawing images with box on the Mac port, and I suspect it also happens on W32 because their code are similar (though I can't test it). Could someone try if it is reproducible on W32 and if so, please try the patch at the end? Steps to reproduce: 1. $ emacs -Q -D & 2. (insert-image (create-image "splash.png") (propertize " " 'face '(:box (:line-width 5)))) C-j 3. C-p C-p Result: The left half of the character `t' just after the image gets erased. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/w32term.c' *** src/w32term.c 2014-03-26 15:57:13 +0000 --- src/w32term.c 2014-03-27 02:32:46 +0000 *************** *** 2082,2094 **** static void x_draw_image_glyph_string (struct glyph_string *s) { - int x, y; int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); int height; HBITMAP pixmap = 0; ! height = s->height - 2 * box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce --- 2082,2097 ---- static void x_draw_image_glyph_string (struct glyph_string *s) { int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); int height; HBITMAP pixmap = 0; ! height = s->height; ! if (s->slice.y == 0) ! height -= box_line_vwidth; ! if (s->slice.y + s->slice.height >= s->img->height) ! height -= box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce *************** *** 2101,2112 **** || s->img->pixmap == 0 || s->width != s->background_width) { ! x = s->x; if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! x += box_line_hwidth; - y = s->y; if (s->slice.y == 0) y += box_line_vwidth; --- 2104,2120 ---- || s->img->pixmap == 0 || s->width != s->background_width) { ! int x = s->x; ! int y = s->y; ! int width = s->background_width; ! if (s->first_glyph->left_box_line_p && s->slice.x == 0) ! { ! x += box_line_hwidth; ! width -= box_line_hwidth; ! } if (s->slice.y == 0) y += box_line_vwidth; *************** *** 2150,2156 **** } else #endif ! x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); s->background_filled_p = 1; } --- 2158,2164 ---- } else #endif ! x_draw_glyph_string_bg_rect (s, x, y, width, height); s->background_filled_p = 1; } ------------=_1395968164-25020-1-- From unknown Fri Jun 20 20:11:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Mar 2014 07:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: YAMAMOTO Mitsuharu Cc: 17115-done@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 17115-done@debbugs.gnu.org id=D17115.13959915124469 (code D ref 17115); Fri, 28 Mar 2014 07:26:01 +0000 Received: (at 17115-done) by debbugs.gnu.org; 28 Mar 2014 07:25:12 +0000 Received: from localhost ([127.0.0.1]:53559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTRA7-00019z-0O for submit@debbugs.gnu.org; Fri, 28 Mar 2014 03:25:12 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:48107) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTRA0-00019j-9V for 17115-done@debbugs.gnu.org; Fri, 28 Mar 2014 03:25:05 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N3400B00XOPSA00@a-mtaout22.012.net.il> for 17115-done@debbugs.gnu.org; Fri, 28 Mar 2014 10:25:02 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N3400BGPXXQIP70@a-mtaout22.012.net.il>; Fri, 28 Mar 2014 10:25:02 +0300 (IDT) Date: Fri, 28 Mar 2014 10:25:03 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <838uruyecw.fsf@gnu.org> References: <83vbuzy592.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 28 Mar 2014 09:54:53 +0900 > From: YAMAMOTO Mitsuharu > Cc: 17115-done@debbugs.gnu.org > > > Thanks, I installed this with minor changes (to keep the original > > code style intact). > > I moved the variables `x' and `y' to the inner block because that > makes the code look more like the corresponding one in xterm.c. I don't object that in principle, I just think that style-related changes like this should be separate from the other changes, because otherwise they make it harder to understand what exactly was changed, and why.