From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: XInput 2 support (again) Date: Sun, 14 Nov 2021 10:29:02 -0500 Message-ID: References: <87v90wmh6m.fsf.ref@yahoo.com> <87v90wmh6m.fsf@yahoo.com> <87a6i7le2u.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9785"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Po Lu via "Emacs development discussions." To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 16:31:43 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mmHTq-0002MQ-Pm for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 16:31:42 +0100 Original-Received: from localhost ([::1]:44568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmHTp-0005W4-Nf for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 10:31:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmHRM-0003r3-KG for emacs-devel@gnu.org; Sun, 14 Nov 2021 10:29:08 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmHRK-0003vl-76 for emacs-devel@gnu.org; Sun, 14 Nov 2021 10:29:07 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2E052100264; Sun, 14 Nov 2021 10:29:05 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 78A7F10000A; Sun, 14 Nov 2021 10:29:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1636903743; bh=ZacOAluX7z7VkqVeEatCx96W8zvjW+J541TKmJzZVRc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mDdOFVThis6/YvpL60fRmijFIUum4D/LzPBUKOXkyrTs/xkBFWzXek2jFxHBgpQqn RetC22UcahAMO0SPmiqXjyLCN1jLXP4bJHu3347Ro0ioL2xAIDsCFOMU1sUxrFNp1u ogap4XEuCAIFTbK4cIlaUD4vWUr6Fkcg5VkuJCKGkIiZZVPckBgNDT70hNiUusqWFM fPOrEC2tEinLCyVuz2K6JB6bd7ho/YImRlwFBa0YBszZCin3OOW6vHDz3p1v8Xla6y dp+Sqj7Og+EGNJHUypEzjxmN8N6kijVk6rY2rYVOZcJRJ4E27BUahPV8yc7b6ibPu+ LyYKB9GiS8WnQ== Original-Received: from pastel (unknown [45.72.128.33]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 502A0120680; Sun, 14 Nov 2021 10:29:03 -0500 (EST) In-Reply-To: <87a6i7le2u.fsf@yahoo.com> (Po Lu's message of "Sun, 14 Nov 2021 09:29:29 +0800") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279422 Archived-At: >> A lot of it is copy&pasted from other parts of `handle_one_xevent`. >> Please avoid such code duplication (`handle_one_xevent` is already bad >> enough from this point of view). > > I don't know enough about most of the Core Input code to dare change it. > It does mysterious things that I can not understand. > > Also, most of the XInput 2 event code differs in subtle ways from the > Core Input code (see for example how the button grab is handled there). > > It would make even more of a mess to try to reuse the Core Input I'll let Eli&Lars decide if they're OK with it (after all, we have a lot of such code duplication between the various x/w32/ns/.. backends), but I think I'd like to see a unified version of the code before deciding that the copy&paste is indeed a better option. Stefan