From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: XInput 2 support (again) Date: Sun, 14 Nov 2021 18:12:02 +0200 Message-ID: <83wnlau371.fsf@gnu.org> References: <87v90wmh6m.fsf.ref@yahoo.com> <87v90wmh6m.fsf@yahoo.com> <87a6i7le2u.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3858"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 17:13:36 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 1mmI8N-0000pm-Td for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 17:13:36 +0100 Original-Received: from localhost ([::1]:38162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmI8L-0005Wa-TG for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 11:13:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmI75-0004Ar-UF for emacs-devel@gnu.org; Sun, 14 Nov 2021 11:12:15 -0500 Original-Received: from [2001:470:142:3::e] (port=57106 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmI75-0000Aq-Kv; Sun, 14 Nov 2021 11:12:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=k8uPn1f36EtArMMsxWfGt0AOCTSjU95ujgO51InUpS8=; b=IOLvrqgm6Pjm kHwkdNojhLCl52OPEFbsHri4YuZe4tWrtLnUBYS4VuK9kdPhcy/i7nDp4PmJGAxapax2eHi2Ws76d m6Foay6fyfNwLtVODZPPvjhlWy91bzfwPi9Nwm5U5JBVyafBo+qGf1MiaK6ja47wEbvoOxJEWAk9p 2OA5JqpXEdcc254Ex/T0gow8hQgrhwWo9pfAiO8ONuiQwHHliQb+GsLym4UaNjRghtSqSFo5hsEGr Q2T7g4HR5pqsjmkPsCkyOL3uapewIvK9v+CeTX8qDEPxciBhi6Kkz5vEtvaNeRgZ6FpsefSs3lFkC oHkpCtm60CnNbwIjTdAjEw==; Original-Received: from [87.69.77.57] (port=1922 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmI75-000130-1V; Sun, 14 Nov 2021 11:12:15 -0500 In-Reply-To: (message from Stefan Monnier on Sun, 14 Nov 2021 10:29:02 -0500) 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:279426 Archived-At: > From: Stefan Monnier > Cc: Po Lu via "Emacs development discussions." > Date: Sun, 14 Nov 2021 10:29:02 -0500 > > >> 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. I had the same comment when this patch was first posted. Po Lu says it's infeasible for him to make it less repetitive.