diff options
author | Amos Bird <amosbird@gmail.com> | 2021-03-25 14:50:46 +0800 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-03-25 17:22:46 +0200 |
commit | 0e4795fc989478d394bbc3870ee28baf6bd23116 (patch) | |
tree | 1f6b557eb61995b1327984adc50b399d386c46da /src/xfns.c | |
parent | 6a4ed891d84b1ca1e4d68a6de9dd374f1fadd971 (diff) | |
download | emacs-0e4795fc989478d394bbc3870ee28baf6bd23116.tar.gz emacs-0e4795fc989478d394bbc3870ee28baf6bd23116.tar.bz2 emacs-0e4795fc989478d394bbc3870ee28baf6bd23116.zip |
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)
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c index ab04396703e..b9b396382b1 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); |