From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66765: 30.0.50; Building emacs with xinput2 breaks receiving XSendEvent events Date: Fri, 27 Oct 2023 08:32:44 +0800 Message-ID: <875y2szyz7.fsf@yahoo.com> References: Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5284"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66765-done@debbugs.gnu.org To: Ami Fischman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 02:34:00 2023 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 1qwAnX-00019e-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 02:33:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwAn8-0004yK-0K; Thu, 26 Oct 2023 20:33:34 -0400 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 1qwAn6-0004tk-3S for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:33:32 -0400 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 1qwAn5-0006od-R3 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:33:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwAna-0003ar-C0 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:34:02 -0400 Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 00:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 66765 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix Mail-Followup-To: 66765@debbugs.gnu.org, luangruo@yahoo.com, ami@fischman.org Original-Received: via spool by 66765-done@debbugs.gnu.org id=D66765.169836681613748 (code D ref 66765); Fri, 27 Oct 2023 00:34:02 +0000 Original-Received: (at 66765-done) by debbugs.gnu.org; 27 Oct 2023 00:33:36 +0000 Original-Received: from localhost ([127.0.0.1]:34735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwAnA-0003Ze-20 for submit@debbugs.gnu.org; Thu, 26 Oct 2023 20:33:36 -0400 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]:43436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwAn7-0003ZJ-IM for 66765-done@debbugs.gnu.org; Thu, 26 Oct 2023 20:33:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1698366776; bh=KF38pC84RL4rL9cWCK9k0s9H9NYUmd6VkyQtiug76Yw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=eN51YmjTBtRrsCzcvPOEE/KlSxvIC+XOJysv4ite15J8Un+p+yVf8YMP3pwGrg+gmLlv378CFccuCKHcimqCNnCcnRVlhySytS4oepIYYv9vvs+N/7xw8oaeWgP2o0r3VueukheSlQpX8UQIo+zAm7fDnRvL112HxQsK6w9lHZbXd1CE/uCoZyHKwgVzOL20c05u21UXq323V06KK0nmXwgWm0M2IYpO9wShZptptx0nKLM77JvR209gUC6wbl1opJj62Fq+niXpobkJsTPz0vjPQSIo6Pfd9lNpKsU9G0vi84XwYjvSTujCsnbH0YbhEdp8L0kgeV4a8XrUI/hXgA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1698366776; bh=olQHC+ct54WoXo43d3OqTJsRapOnpM2Ak83Lx3d2Cvm=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ZuQzOfbZX0waROtsqKkv7dWB+Ldqq1i6R46ggH6/+Dr+d2qO8uCD7oQer0eBDLloafE0++gLpI58WJ/+B/PE7LVXNhZpFS7uX4vbuekTWiBH6KUnbDyYQrcQe/omUsQnEGBYb0776KQyqxuK6cBlN0gfqqBYiqMm2pLctKPF4/yhsm+sNMnGYaT9UXh7mSR7km4xk3ZsdvlEPGCKUphBYH/uY5G94ROR92WB0bTGoFA0dpA+XFQth8t0ikCgQYDOwpKbhDDdj9l/IAQnhN7ul71sIUhV0L2pegsvcNz9Prd/kZSnrtRX5iBGPif3DF12XG6PTmkUSvX8ZwD3/7N7hw== X-YMail-OSG: XIa2AmIVM1ntp0LXbZy7qposnKbPrkOrdQ1Cnts6EYp2l5GD9abYJVm6anoTnZI yhcvHvpMkATl2eM6rmE1sDxlGtq9Des5H8OYZO5gkSyDYsnaGLUA77zVLFrXkfwou5ASDrHXH5rO E8jIjO_j4EuJ99wXC0JsLWr42w1aYKPw1n0m3_iYNfpWcCZA7lI9SroaPHpkPoPb1wr22CFUSxhx MKayqVnU5V7MSc3gAKNKnkWkgs7QLvBT48qZljHDDZc64SarwmMa756UwhVNRysr5j9E4LoSoJZH belmmpCDQK938Hp.cyd1FaFdavezO5fxHBtnFBMRyTHS2WgS3k6eyS.gVjO.igsZgUEZeIZ6ZvqH FZgL_QP_5mEdVRgjAnRR7sf_gAvPZzkwTdW69riEwQnsNSojHVk5xsxoCJAaDkTB.DrJufvFDOSL UActUY0dhL9ZkzmyrmEzlsJgnpj1_1KZ_x7qBi66ZUFfX8WllxcJRXShqZnI4ilzJe1havw0CDQs ZBbuGYfuRb6YJ04.GV10jrCSej3lKDFpI7ajvgOgO0g.OPjv5wktStbD8rtpXUXjxkXn5_tTRrd4 zKHlj8KMGvvVnuhTVLR6xNCycqYPOo9J5pgeg3SHxeI1cxikPhRk91OVGZuO5QPZXHTZzRRsnCBa qfhMAFw3zewupIbGyJ5xc5t3g6lG0B0_TMeoanGmc1vA9CCMoMfRtK6RnNnXC1dESpa2yQ3QbD57 thf8He3b8rGrpYiOrqbhfV1PI5lndmpDaduOLGJseLU14PbUqvPimVdMWvQClrjNRvi84zfpG54B t7ZPtgKcy_zdcn2lgX2R8b0JckGDj5GBGXtHZytjkb X-Sonic-MF: X-Sonic-ID: dd5dd68e-3208-4b3d-9ad6-b1c5f03efd68 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Fri, 27 Oct 2023 00:32:56 +0000 Original-Received: by hermes--production-sg3-8696d769c6-r64c6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5630b4d49a28a7cc72477bc948617d6d; Fri, 27 Oct 2023 00:32:50 +0000 (UTC) In-Reply-To: (Ami Fischman's message of "Thu, 26 Oct 2023 10:49:30 -0700") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:273331 Archived-At: tags 66765 + notabug wontfix thanks Ami Fischman writes: > 1. Run: `emacs -Q` on an X11 display for a binary that's been built > with (the default) `--with-xinput2` > 2. From another program, trigger an XSendEvent targeting the above > emacs' window sending a key event. > Expected: > 3. The sent key event is seen by emacs. > Actual: > 4. Emacs doesn't seem to receive the sent key event. > > Simplest way to execute step 2 above is: > $ git clone http://github.com/epitron/xse.git > $ cd xse && ./configure && xmkmf && make depend && make > $ xwininfo > (click the emacs window and note its reported "Window id" for the next command) > $ ./xse -win -Debug 'l' > > When emacs is built with `--without-xinput2` the issue is gone, and > sent events are received properly. > Issue is not present in 27.1 or 28.1, but is present in 29.1 and HEAD. > Confirmed with a git bisect that the issue showed up when xinput2 was > enabled by default in > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0105a4ddb8a58146f3fc71c265e57291c873af0b > > I stumbled across this issue when upgrading from 27.1 to 29.1 and > noticing that ratpoison can no longer send its escape key (in my case, > this is C-a) to emacs, even though it has no problems sending the same > key to every other app on my system. When the X input extension is in use, both Emacs and the X server ignore core events. It's also impossible to send extension events, so this extension renders external event delivery effectively impossible. This isn't a bug we can fix, sorry; but the XTEST extension is capable of simulating real key presses, so I suggest whatever tools send Emacs events be rewritten to make use of that extension. The same issue can be observed in programs written to use version 3 or 4 of the GTK toolkit.