From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 22:42:40 2014 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; } From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 00:48:19 2014 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 To: 17115@debbugs.gnu.org Subject: Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32 In-Reply-To: References: 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 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 debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 12:29:36 2014 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 Subject: Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32 In-reply-to: X-012-Sender: halo1@inter.net.il To: YAMAMOTO Mitsuharu Message-id: <83vbuzy592.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17115 Cc: 17115@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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 debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 20:55:06 2014 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 28 03:25:12 2014 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 Subject: Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32 In-reply-to: X-012-Sender: halo1@inter.net.il To: YAMAMOTO Mitsuharu Message-id: <838uruyecw.fsf@gnu.org> References: <83vbuzy592.fsf@gnu.org> X-Spam-Score: 1.0 (+) 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 Reply-To: Eli Zaretskii 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. From unknown Sat Jun 21 10:38:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 Apr 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator