From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ami Fischman Newsgroups: gmane.emacs.bugs Subject: bug#66765: 30.0.50; Building emacs with xinput2 breaks receiving XSendEvent events Date: Thu, 26 Oct 2023 10:49:30 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11652"; mail-complaints-to="usenet@ciao.gmane.io" To: 66765@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 26 19:51:05 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 1qw4Vd-0002qr-2g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Oct 2023 19:51:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qw4VD-0004T3-N2; Thu, 26 Oct 2023 13:50:48 -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 1qw4V6-0004Qx-D0 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 13:50: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 1qw4V6-0006CT-4s for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 13:50:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qw4Va-0006wv-Kl for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 13:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ami Fischman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2023 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66765 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169834263026666 (code B ref -1); Thu, 26 Oct 2023 17:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2023 17:50:30 +0000 Original-Received: from localhost ([127.0.0.1]:34442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qw4V4-0006w1-0M for submit@debbugs.gnu.org; Thu, 26 Oct 2023 13:50:30 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:52060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qw4V1-0006vj-Sr for submit@debbugs.gnu.org; Thu, 26 Oct 2023 13:50:28 -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 1qw4UR-0004Mo-00 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 13:49:51 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qw4UN-0005sE-FH for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 13:49:50 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53e855d7dacso1885222a12.0 for ; Thu, 26 Oct 2023 10:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fischman-org.20230601.gappssmtp.com; s=20230601; t=1698342582; x=1698947382; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7ciKXBKWMjMJ/ujd4ZmRwfbJ1TYuc/9St1dWY1I+1G4=; b=DC7T3ml61JSWdrzmaOgcNgIvkWptWFYmE+c0HLQN5n2UB053qff0zgaqrF6F4E0zpK 7O/0OGRz6qHHl8qiLYMHQjpYXXVhxqsiuOOcMEpXDI5PkcL+wSJSZXWzRgCcphh3TCvf aU07Cu0GTZZFLvLUk8U6MFj08B0rC7MUkHfPcPjEHAIe96F1AMvUYDmoMYU7e9YzlKFY dxZwmojxXKAjSrc0RSqEGQfZldC27UU6HAs9m0dIC85Z4fjVeTsm0nkz0ywxT1n3kQne JpztwuG+cxqZBJGWEL2jRqsz7nTa7KYzWq14dULOSBj9eUE+obKfq/wg1jfw0BwdYgiT wvdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698342582; x=1698947382; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7ciKXBKWMjMJ/ujd4ZmRwfbJ1TYuc/9St1dWY1I+1G4=; b=g+y3WGG4HutmVN0C3DJ/79q911xsSiX8yOw2OY2wZ/W6z4sT07WaiHi2kvaj6c23BV 4YV9SgeeV0Kd4yaLy2r0nxwUGzW1PzXmvLuBVpdz4AXkdyd1QzOAxLgfbCw/B+O02bjY UtaqhwyC6ATZE8fnfiLRMNNDzNnLSNlY22mNrAGYkjZQC5N3WYWiXj33OWz+Vq51noZ7 S0V7bF9dxRQQS81zSvhlA+k4YKJgamI0xuY/WidaqxwUUXVkk5mZCNmP+UBotVlnJIHq fQ8ptTXcXcGTlT9dhaNAUkDz0txY2NIdaC3KdKJXToi2VJ81us/812jRBrxp7ZSxNCtQ 2//w== X-Gm-Message-State: AOJu0YxvcL/wkE8REk/+Z0OkxEzhVLVMpvuEjNkgL+7QyICnOB22aoR5 uklpiX1lANSxuUChgCLGQKnXspMMHvXi0VQqyBKrEftP563L2phTs59aTA== X-Google-Smtp-Source: AGHT+IH6LwINVCfZmPpDy2jJ/DmY4az6sCmwFwv5SWVxG+RCq5GK8U4uAt/yGRs2kXGJKofY/XciIaEy3F41aPceQOU= X-Received: by 2002:aa7:c90f:0:b0:53e:34c5:fc14 with SMTP id b15-20020aa7c90f000000b0053e34c5fc14mr421800edt.23.1698342581719; Thu, 26 Oct 2023 10:49:41 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=ami@fischman.org; helo=mail-ed1-x52b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:273307 Archived-At: 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. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-10-25 built on Repository revision: 70e25298f160ffec62e363056904b6238a87d4e0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Ubuntu 22.04.3 LTS Configured using: 'configure --prefix= --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/29.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars --with-imagemagick --with-json --with-tree-sitter --with-xwidgets 'CFLAGS=-g -O2 -fstack-protector-strong -w' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB Important settings: value of $LC_ALL: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads xwidget-internal dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 37691 9512) (symbols 48 5216 0) (strings 32 13286 1532) (string-bytes 1 375218) (vectors 16 10300) (vector-slots 8 156562 17668) (floats 8 38 21) (intervals 56 259 0) (buffers 992 10))