From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74590: 31.0.50 [scratch/igc branch]; key input sometimes skip fcitx input method preedit box Date: Sat, 30 Nov 2024 16:37:03 +0000 Message-ID: References: <87iks5xayc.fsf@gmail.com> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1=_u9B0lfQqC7JzzFheXsu5x0nw9Haiut4ewSo9wyYf6EU" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yikai Zhao , Helmut Eller , 74590@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 17:38:17 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tHQU5-0000Zr-GM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 17:38:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHQTu-0001G4-15; Sat, 30 Nov 2024 11:38:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHQTr-0001Fq-0f for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:38:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHQTq-00020Q-OV for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=cYq3IMzmby/kATzpbugsoFwhzPYDfJAMxwx9lWibSYQ=; b=jsNN0MpBAEKl6cvL5OKMHlVsjYRFvJfDYbxnczhcgmsa9Ur4rPIWVMGveDvsWhpERdZ6FP+c+rB9kFMkwE/fGpRTXQctKcgrLlfTXl9Klz4qHNN4Bu9mY6n7e5t5Q+BwPkaYi+BwnXa6X1cuIwtxaNVHBuV0PqGYV9dPlJoLkWEORbhZ6KUGrXrEOsLcDSgDzgzg6bwM6Jr+xM84L+nYKsXBqk/ZLaPj7YXYXBssKlte8nwX8US8tF8DwgBVMSqVW0b77DWGYDyGIFgJyZSYrkDKOurmw1CUcvdfL94aKzTU8sGQk2Wbuu3V/gtTAPlOxxpixbXxcYE7v8TIVu1OEg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHQTq-0003Kk-Aq for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 11:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74590 X-GNU-PR-Package: emacs Original-Received: via spool by 74590-submit@debbugs.gnu.org id=B74590.173298463712732 (code B ref 74590); Sat, 30 Nov 2024 16:38:02 +0000 Original-Received: (at 74590) by debbugs.gnu.org; 30 Nov 2024 16:37:17 +0000 Original-Received: from localhost ([127.0.0.1]:48434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQT6-0003JH-Po for submit@debbugs.gnu.org; Sat, 30 Nov 2024 11:37:17 -0500 Original-Received: from mail-10630.protonmail.ch ([79.135.106.30]:60361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQT4-0003It-E9 for 74590@debbugs.gnu.org; Sat, 30 Nov 2024 11:37:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1732984627; x=1733243827; bh=cYq3IMzmby/kATzpbugsoFwhzPYDfJAMxwx9lWibSYQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=IeQA5y23IYnmWrcmCLe0EPRqim0QlL+rE50476PWEtmvVPY/fGajG/lbndg5jMUID bK1wr+5cnOdllcVchBBvnh/dXfKz0OIBHkeKPanGGyEe2KrH1chbCWK3uiKSGWo4NR sp45nwxF5y6qyFr+3oQKA+jKZAlCw7B+t7Fn4EmrXxcITXDIVgS6FU+FryE393EkPM R9ApsyKib+zwzTzwPDkuGtA6xWgMJg4o6MNwg1unbxCmo6ZbVXtMnLU1hlBvi+/uj6 AzZB7ooQFfeqegKlxu59TPzAzDwNp6Cfg0Hb6fIQSdVqZUcmflSjHfeKx1KxWNvLz5 4FxgXo37vSlNg== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 0a6f8efe849eb8348cf198675d6cad1a421160df X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296178 Archived-At: --b1=_u9B0lfQqC7JzzFheXsu5x0nw9Haiut4ewSo9wyYf6EU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Saturday, November 30th, 2024 at 10:55, Gerd M=C3=B6llmann wrote: > Helmut Eller eller.helmut@gmail.com writes: >=20 > > On Fri, Nov 29 2024, Gerd M=C3=B6llmann wrote: > >=20 > > > > Not sure if that is used in your build, but in x_display_info (xter= m.h) > > > > I see a number of struct frame pointers that are not fixed in fix_f= rame, > > > > starting with > > > >=20 > > > > struct frame *x_focus_frame; > > > >=20 > > > > And if it's not that display info that is being used, I'd bet a sma= ll > > > > amount that whatever is actually used (pgtk_display_info?) has a si= milar > > > > problems. > > > >=20 > > > > (Can't fix this myself, sorry, I only have macOS.) > >=20 > > I think the x_display_info struct (I guess usually only one exists) is > > allocated in x_term_init (or pgtk_term_init) with igc_xzalloc_ambig. So > > theoretically it doesn't need to be traced. >=20 >=20 > Then we're good, sorry for the noise. So it turns out X input method handling is somewhat complicated! I've tried installing fcitx, but it seems to be working the same here with = and without MPS. It would help to establish the value of x-gtk-use-native-input, since that = determines whether we use the GTK or X method for communicating with fcitx. I've attached a patch which logs some debugging info to stderr (because dis= playing messages using X while debugging X code is a bad idea, IME). If you= could apply it and reproduce the output around a keypress that's handled i= ncorrectly, that might help us track this down. Pip --b1=_u9B0lfQqC7JzzFheXsu5x0nw9Haiut4ewSo9wyYf6EU Content-Type: text/x-patch; name=0002-fcitx.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0002-fcitx.patch ZGlmZiAtLWdpdCBhL3NyYy94dGVybS5jIGIvc3JjL3h0ZXJtLmMKaW5kZXggZWJjZDNhNzg2ZTIu LjA2NmQzODI4YmNmIDEwMDY0NAotLS0gYS9zcmMveHRlcm0uYworKysgYi9zcmMveHRlcm0uYwpA QCAtNjkxNCw2ICs2OTE0LDcgQEAgeF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