From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yikai Zhao Newsgroups: gmane.emacs.bugs Subject: bug#74590: 31.0.50 [scratch/igc branch]; key input sometimes skip fcitx input method preedit box Date: Mon, 2 Dec 2024 16:56:39 +0800 Message-ID: References: <87iks5xayc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6956"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Helmut Eller , 74590@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 09:59:18 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 1tI2Gz-0001gU-Gr for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 09:59:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI2Gi-00041r-Nb; Mon, 02 Dec 2024 03:59:00 -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 1tI2Ft-0003XQ-Cd for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 03:58:09 -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 1tI2Fl-0003Kt-TO for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 03:58:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=p5oY+6yaoa4UN0fIEhx5NMBPwJWFkxJnROAeaw2RZNE=; b=X4d3vXQZTfD11nY/biGZIogN93PFVT1OVTE3EBq5jmeELFuu8qS9uQRlDxAGas3nvXbM7r4GgCd0Oytjz17ciTDZiYuLRuXe6FIEQxOI7wJiCK4vCEk81uevBHCSJJ9d9w3WM6ZsrDz1WFSFBIQEj8KuAhbys2iJb4Aa6mWnbhD4GwctbI8dI2mnOa6GQ+HloGBGDxe1rMir8VHB6hMqvQpc88QXhEFkVOqOlQB7NeYUdFtrhQQgOvWgZskC6JalpuIgya0mgE5FPdXQB9d4MkSeYuEdHOQEjGnga+1k2b1U38+nOXSG+1/ldDJzaEsS/QljvGJ8+iw9EHRWGejZTw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tI2Fl-0002tY-OY for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 03:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yikai Zhao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2024 08:58:01 +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.173312987311107 (code B ref 74590); Mon, 02 Dec 2024 08:58:01 +0000 Original-Received: (at 74590) by debbugs.gnu.org; 2 Dec 2024 08:57:53 +0000 Original-Received: from localhost ([127.0.0.1]:54223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI2Fd-0002t5-BW for submit@debbugs.gnu.org; Mon, 02 Dec 2024 03:57:53 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:45517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI2Fb-0002sw-1C for 74590@debbugs.gnu.org; Mon, 02 Dec 2024 03:57:52 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-385e96a285eso706516f8f.3 for <74590@debbugs.gnu.org>; Mon, 02 Dec 2024 00:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z1k.dev; s=google; t=1733129810; x=1733734610; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p5oY+6yaoa4UN0fIEhx5NMBPwJWFkxJnROAeaw2RZNE=; b=hqkiHDL+RRxIP3W38D9po0JwMv3O7knCWeV39Li0i5eMPx0nFdgiLoZtg8ksJkMnNY X4xRAnzo4yzakH9YxZn5ekvzwzznRFiTeQlT8TflCc/8y/GGsinevKeoplGZNnvXdljE yGv/wr/6uc19ZA6wfy5Vh7fPwH5cD01sBaPBCOd0YnpanULZt1yg69AfT2bNeixfPeOk aNS7U7ear7uY4/5euzTxhH8bs6XT5YyNRbfsVaBkhU4k7YKn5YAp2KmztLzkuFme4n3z S3eRdIgX8vAcXT/bV9QL6luLe8Dg9jzBv18qD30lNIuE9OfntHXHdnkwMvg1Suan5PqN h1Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733129810; x=1733734610; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p5oY+6yaoa4UN0fIEhx5NMBPwJWFkxJnROAeaw2RZNE=; b=KECdwoMHXcwQWTcSE8s2xyK1Y1DW9aCkJbYXqiX08kvvgo40TTcPbk4u/+qepHQCzl ajZibjX2SHYndgkBNduUJyR5FuYnWL5+/SlrwKDnQP249anHI8HLxdyln5kuIdkgBj7u MD089YkLeb2J8izVOWruAoys+0MewWXhjtAi6aJ9XFquYHuO1akgkL4NqmH3M5s3xAdl uE5LRN7ojwICHALCkqFDgzzZkGIiOgdJ2C4oY483sGG5sUWmzaQO4gyn0ggNZgYoD57Z nBBLWfOxGpnPGQM5BIRLrw4N9ps/zcn7yefjE5Xn9LCn6VWs/sg1iW9cvOXpCe+ey1LJ cQ3Q== X-Forwarded-Encrypted: i=1; AJvYcCWLYpzLMKhwfRwdZMPR7kdRzbFjFyBglXByGXpesDF9bNPv8PRA56fC5alQSJcPsP95g7b/Cw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwAseD8hZ5Yis7i6N2PQ57QcMvAWXzeqZSREsAMCgiU1qZq5x3h ASROPNtf3WKrwhrkSI6jmL51VExfeJV1YHyxk5ZR9/2OqtezC9oKQGN66rVpbkHa9Sbep+/W6pE IA9j6/6HnhK3rTQksEO0tIf5ur9ecZo3J2iqkaQ== X-Gm-Gg: ASbGncsgcmuKg5Lh8UU8P7NPBaP5YQVQFZF9zwHSPXraeUaWjnmRN2BzIZ7tI8XEJ5+ 85EWM2iBXn2eOmt6sLXMD/yr8xfGqfcIevs49mrbyM4wRXqIWuzLKsea/LPiCNJG6KA== X-Google-Smtp-Source: AGHT+IGIIaEx/+PbEe1NqXRh4WfhhIxfD81JXl+niaU5MbwiUx/vJPiebkL5qaa/PHE5hg4dd5yerTHdpsgKNFziG1w= X-Received: by 2002:a5d:5f45:0:b0:385:f38e:c0c3 with SMTP id ffacd0b85a97d-385f38ec33fmr2005021f8f.6.1733129810054; Mon, 02 Dec 2024 00:56:50 -0800 (PST) In-Reply-To: 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:296303 Archived-At: Hello Pip, I have reproduced the issue with your patch, here's the relevant log: (Lines starting with '#' are my comments) dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 # Pressed first character here. It goes to fcitx normally. result 1 (not GTK) for event 2, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 1 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 0 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 # Pressed second character here. It goes to fcitx normally. result 1 (not GTK) for event 2, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 1 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 # Pressed third character here. It goes to fcitx normally. result 1 (not GTK) for event 2, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 # BUG REPRODUCED HERE: Pressed fourth character here. It does not go to fcitx. It goes to emacs instead. result 0 (not GTK) for event 2, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 1 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 0 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 1 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 result 0 (not GTK) for event 3, frame 0x7f37b4f600e8 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 dpyinfo 0x55c17572d8c0 Please let me know if there's any other info I can provide. Thanks! On Sun, Dec 1, 2024 at 12:37=E2=80=AFAM Pip Cet wro= te: > > On Saturday, November 30th, 2024 at 10:55, Gerd M=C3=B6llmann wrote: > > Helmut Eller eller.helmut@gmail.com writes: > > > > > On Fri, Nov 29 2024, Gerd M=C3=B6llmann wrote: > > > > > > > > Not sure if that is used in your build, but in x_display_info (xt= erm.h) > > > > > I see a number of struct frame pointers that are not fixed in fix= _frame, > > > > > starting with > > > > > > > > > > struct frame *x_focus_frame; > > > > > > > > > > And if it's not that display info that is being used, I'd bet a s= mall > > > > > amount that whatever is actually used (pgtk_display_info?) has a = similar > > > > > problems. > > > > > > > > > > (Can't fix this myself, sorry, I only have macOS.) > > > > > > I think the x_display_info struct (I guess usually only one exists) i= s > > > allocated in x_term_init (or pgtk_term_init) with igc_xzalloc_ambig. = So > > > theoretically it doesn't need to be traced. > > > > > > 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 wit= h and without MPS. > > It would help to establish the value of x-gtk-use-native-input, since tha= t determines whether we use the GTK or X method for communicating with fcit= x. > > I've attached a patch which logs some debugging info to stderr (because d= isplaying messages using X while debugging X code is a bad idea, IME). If y= ou could apply it and reproduce the output around a keypress that's handled= incorrectly, that might help us track this down. > > Pip