emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 0e4795f: Fix preeditarea reporting wrong spot.


From: Eli Zaretskii
Subject: emacs-27 0e4795f: Fix preeditarea reporting wrong spot.
Date: Thu, 25 Mar 2021 11:24:18 -0400 (EDT)

branch: emacs-27
commit 0e4795fc989478d394bbc3870ee28baf6bd23116
Author: Amos Bird <amosbird@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    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 (xic_set_preeditarea): Adjust X for left margin width.
    (Bug#47377)
---
 src/xfns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xfns.c b/src/xfns.c
index ab04396..b9b3963 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2785,7 +2785,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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]