From unknown Sun Sep 14 19:39:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47377 <47377@debbugs.gnu.org> To: bug#47377 <47377@debbugs.gnu.org> Subject: Status: [PATCH] Fix preeditarea reporting wrong spot Reply-To: bug#47377 <47377@debbugs.gnu.org> Date: Mon, 15 Sep 2025 02:39:09 +0000 retitle 47377 [PATCH] Fix preeditarea reporting wrong spot reassign 47377 emacs submitter 47377 Amos Bird severity 47377 normal tag 47377 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 02:55:16 2021 Received: (at submit) by debbugs.gnu.org; 25 Mar 2021 06:55:16 +0000 Received: from localhost ([127.0.0.1]:36972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPJtk-0001B0-0Q for submit@debbugs.gnu.org; Thu, 25 Mar 2021 02:55:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:38836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPJth-0001As-TE for submit@debbugs.gnu.org; Thu, 25 Mar 2021 02:55:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPJth-0005Er-L4 for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2021 02:55:13 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:44867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPJte-0002Sw-It for bug-gnu-emacs@gnu.org; Thu, 25 Mar 2021 02:55:13 -0400 Received: by mail-pj1-x102c.google.com with SMTP id kk2-20020a17090b4a02b02900c777aa746fso514670pjb.3 for ; Wed, 24 Mar 2021 23:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=6YvifRIQ1levGM2Qsfh72QPgWzvUFQeV4sdI7faFJ+c=; b=jKwBGiG+5vFgNbiu4Zka/9WdS7URBNNu4VzRB6aZHLnOiQdvum3N8JPGJ9ZVqhrYVZ 0sgRM4D7euhhahINoukRG7NHtgOpm87hyDgZ4VyMKtP3b5anMklug320MfeDjAYEB+mH SqIoBBlb62eHLhXd0zbJYl+P3kb0YqpaA1oXluyhPlQbKITjcImSapfEEaXfwRp+0cBS M2eOvbRX7jibwAor1zlzL/iBoO7wpTyprplbl7czpIVgVnSLgpUMk9FPuRKfjKxelbC6 WoyzAmvw8jMvO6qroo2XOG+VJyJNwCaOgUa49m/B+NTALhSTv0sXPNB3xJWP000C7pM1 Or1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=6YvifRIQ1levGM2Qsfh72QPgWzvUFQeV4sdI7faFJ+c=; b=SMwwbWDjH5yPfvV40ittncJ68HUjEesK9UriEU3NZA3RIODVYTaAR936+GypK5sF01 KM7DOAv9Fg1/xKhl2F9o80QfxyssFi7PovJxNWHYQWlzSG/KVB4L5s5RlBWRK6PKrG8g wWggfcnlXZN8VE1VvSenN4vedHh7LNczz39TnHUABbVIChW/2iDG1n+B+IrvLBG49PDt MIxf5fLQeCKRXbarb6V1MZXcF9Yoeq+MOhqTpLTlL5REmgWZI9UNs/U9KVLjxzonqe9Y uAtmS1Nqyahmim2kUtrxm97UWP4dFoc0xvDxg7KaUlAHkiSHUGUkVpYM/mtUFWeuExVQ LYVQ== X-Gm-Message-State: AOAM531kb3w6iCV9nsQTf/X5nfzeWQZYYOuPJyBWBQTg96e7pUzrPQz1 oNj3M4ciaRV2Bjv8X0e89inK7EAkSKJQYQ== X-Google-Smtp-Source: ABdhPJzMz7lGQabjALSKD8vsW8AXtkavnoZIVWKZlFr7+lRwU6ls9d5VHI/c7J/J3HEuYu374m4Q6g== X-Received: by 2002:a17:90a:516:: with SMTP id h22mr7047536pjh.222.1616655308063; Wed, 24 Mar 2021 23:55:08 -0700 (PDT) Received: from localhost ([103.112.79.202]) by smtp.gmail.com with ESMTPSA id j35sm4702547pgj.45.2021.03.24.23.55.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 23:55:07 -0700 (PDT) User-agent: mu4e 1.4.10; emacs 28.0.50 From: Amos Bird To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix preeditarea reporting wrong spot Date: Thu, 25 Mar 2021 14:57:13 +0800 Message-ID: <87k0pv4t6e.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=amosbird@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.3 (--) --=-=-= Content-Type: text/plain; format=flowed This patch adjust the x position of preeditarea with both left fringe and left margin, which prevents IME preedit box (such as fcitx) from placing at the wrong position in GUI emacs. This fixes the bug described in https://lists.defectivebydesign.org/archive/html/emacs-devel/2017-02/msg00817.html I've already assigned the form for contributing to emacs. regards, Amos --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-preeditarea-reporting-wrong-spot.patch >From 769adf8858c067e779c07087f53048455ff1c7f3 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Thu, 25 Mar 2021 14:50:46 +0800 Subject: [PATCH] Fix preeditarea reporting wrong spot. This patch adjust the x position of preeditarea with both left fringe and left margin, which prevents IME preedit box (such as fcitx) from placing at the wrong position in GUI emacs. --- src/xfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xfns.c b/src/xfns.c index d90644819b..0507dc8f61 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2783,7 +2783,7 @@ xic_set_preeditarea (struct window *w, int x, int y) XVaNestedList attr; XPoint spot; - spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w); + spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w) + WINDOW_LEFT_MARGIN_WIDTH(w); spot.y = WINDOW_TO_FRAME_PIXEL_Y (w, y) + FONT_BASE (FRAME_FONT (f)); attr = XVaCreateNestedList (0, XNSpotLocation, &spot, NULL); XSetICValues (FRAME_XIC (f), XNPreeditAttributes, attr, NULL); -- 2.31.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:26:12 2021 Received: (at 47377-done) by debbugs.gnu.org; 25 Mar 2021 15:26:12 +0000 Received: from localhost ([127.0.0.1]:39264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRsC-0002ak-Dt for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:26:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRsA-0002aW-Hr for 47377-done@debbugs.gnu.org; Thu, 25 Mar 2021 11:26:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53143) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPRs5-0000rm-C1; Thu, 25 Mar 2021 11:26:05 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2717 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lPRs1-0007Ez-Hu; Thu, 25 Mar 2021 11:26:03 -0400 Date: Thu, 25 Mar 2021 17:26:00 +0200 Message-Id: <83tuozqmpj.fsf@gnu.org> From: Eli Zaretskii To: Amos Bird In-Reply-To: <87k0pv4t6e.fsf@gmail.com> (message from Amos Bird on Thu, 25 Mar 2021 14:57:13 +0800) Subject: Re: bug#47377: [PATCH] Fix preeditarea reporting wrong spot References: <87k0pv4t6e.fsf@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47377-done Cc: 47377-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) > From: Amos Bird > Date: Thu, 25 Mar 2021 14:57:13 +0800 > > This patch adjust the x position of preeditarea with both left > fringe > and left margin, which prevents IME preedit box (such as fcitx) > from > placing at the wrong position in GUI emacs. > > This fixes the bug described in > https://lists.defectivebydesign.org/archive/html/emacs-devel/2017-02/msg00817.html > > I've already assigned the form for contributing to emacs. Thanks, installed. From unknown Sun Sep 14 19:39:09 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, 23 Apr 2021 11:24:12 +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