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#57012: Activating versus raising frames Date: Sun, 07 Aug 2022 11:29:19 +0800 Message-ID: <874jyo20kw.fsf@yahoo.com> References: <18270a59cb0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <878ro25eo7.fsf@yahoo.com> <6c3817726a4fc63e83a3d004dffdf072cae278c5.camel@dancol.org> <87y1w03jhv.fsf@yahoo.com> <06468240-fd7c-72e8-2538-b65dd2f28665@dancol.org> <87czdc3h6s.fsf@yahoo.com> <1827637baa0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <87pmhc21t3.fsf@yahoo.com> <18276492f60.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> 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="30962"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 57012@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 07 05:30:12 2022 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 1oKWzU-0007uC-Cx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 05:30:12 +0200 Original-Received: from localhost ([::1]:39146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKWzS-0002Gl-NW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Aug 2022 23:30:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKWzK-0002GZ-JL for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 23:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46047) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKWzK-00012j-9s for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 23:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKWzK-0000cp-38 for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 23:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Aug 2022 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57012 X-GNU-PR-Package: emacs Original-Received: via spool by 57012-submit@debbugs.gnu.org id=B57012.16598429822353 (code B ref 57012); Sun, 07 Aug 2022 03:30:02 +0000 Original-Received: (at 57012) by debbugs.gnu.org; 7 Aug 2022 03:29:42 +0000 Original-Received: from localhost ([127.0.0.1]:35796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKWyz-0000bt-Nr for submit@debbugs.gnu.org; Sat, 06 Aug 2022 23:29:42 -0400 Original-Received: from sonic303-20.consmr.mail.ne1.yahoo.com ([66.163.188.146]:46331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKWyv-0000ba-Ht for 57012@debbugs.gnu.org; Sat, 06 Aug 2022 23:29:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1659842970; bh=hlBAzEwJ9WqCzc81U9C3OPcAVtiTJcSp9+U3tPpy1UI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=CkUnTr5ye4xaKoPb0zGfxFLYvKzDHPoMt1p8AugcIVmqolSJPVSv5FPwbHn/NOAbTQ0Z2VzNlRNiRipldepwq+/+1rqRag2DKmrxaGapEfyOcCIZFQWwfZnVxrt6kDZW0w+u1XBIDUl5lTwpEpzEsbVBIXHrHJijp34uxbK7IH+zNnw0I344c3+DaMjb2fdeVkBk9SlhniWPIwj1+ZZjeK8S1SCBpuwZeO5po0m/zj3HEtmvC+E6g8EQi4eBVbW1V0MzF+gqMw829ZcfNwsOJ7kdnM49DU4nToA7k7383jFywE7rJ854ii5U7/NmHVrPuplClm08H6a4rtuhy5dFog== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1659842970; bh=qio4Im6iHWhU2rK5JuQMLJfwS+zDL8J95EKDH+RJgCQ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Ps+3+CezFaa1o09MMxRT+2mGfpSB0DilkQ/o38eO3av/iZ+vk1XipRjNfAmVbz0Jpx/Fz5ruch9Wdm76M9BiOPkhdtGN0mULbBq6M0Q3uuMbm813HHc5OT7Q8QA4hkrEZN0vfCLDTkI96VjDHyn3eQrm6jDuxht2suJ4YT9gvV+9WIJL7JEof1lc8naHs6JMGqEoWVWbPzigHQOhDe9/mZCOGpIeTPY42gs3AmjSsAFlYvmezJLkzYfKUs5tSMtD5Iv3T4EW+c1/8avLPLOW6qNcdceOb5eu6qHRn0Sgak/1N1VGA3bcstgb20+7C7KGGbKz8oQDkjIquxn7uxhpWw== X-YMail-OSG: LT6awlwVM1k3cI7ockQp17X4jBDOFqa3X36j38rKEY4maD3iBZkv42L4ojVpoil fvtzp56Q_fRLl9eeRRU42rMWnDRBQCJuhBEOMCHGpWnwo0jB1dbvhLASYfDsR0hFCyO_4UaLXbiu 5RZoZS5nHUf.vEg71je94rRDPSKKWCCOn.d0qLbosbgSrccHFJQKzDTgs.A7ECwxfRwXmik6m1JD kWSQweh.duL4g7MNceCiDslC_UvSF_cwkwuL1bdXvH5qTElYglnRRPwPj3e5lBv2EA_xSR3j4GwG di5JbqsGy3H1y5HLVF1jwwn2Qi0e4YTwnQ2L9Fj5S6cQ1qMSiQpjQrT9u8dSAy2SqV.PQnI9ka1_ dHFU3Z_aky2wfSqF8P14._3x3TXJrLSnBGWRsRK3L9Aj8NhvlrZZaoecmsUptDmT_UuYjIJLIL7y ywtl1Mn3XDKf8o0xdhq_mG0AKP0befciRy_lx9oWaRQUNDXq1PdqEtwKQWp7Hj92bUSCJr44wNAu L_dIJ.18NR2eWhb._6O5un4kVpt8oN_B5NM1b8j7uigt.hp4WxkmXGw_cPRSA3r87Ae15W1TFKkU OFbTQRj7rGG24ixr3.E1hQB5hCTP8inqdsJ3BJLWAxGDHALn_5Ls3BNnmk6g1zUmJ8C8ZgdDQpFK CFTglRNPOYQdY1BFsDJJRVetvIgjcIZC7XxVvUOLzJkdX8TFSjWlrqY6d4Ok2NZxo.BEBUtUdXhW QcVcqHh0HTkWLIoeWTb8yPlFZ5cvBWYmX.5BLOxmr.D6AdkbuJJ_gpoxK4JHZ88OirxdYVvtX63a NYUcaJTeT1c3PUTt0Zkfx5LtwhOhjpKzd3Wzvncvuf X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Sun, 7 Aug 2022 03:29:30 +0000 Original-Received: by hermes--canary-production-sg3-6f58cd9b5-q5dg5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID aec3099b74d3938dcfc77d7dfe9b0013; Sun, 07 Aug 2022 03:29:25 +0000 (UTC) In-Reply-To: <18276492f60.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (Daniel Colascione's message of "Sat, 06 Aug 2022 23:11:24 -0400") X-Mailer: WebService/1.1.20491 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" Xref: news.gmane.io gmane.emacs.bugs:239023 Archived-At: Daniel Colascione writes: > On August 6, 2022 23:03:04 Po Lu wrote: > > Daniel Colascione writes: > > pgtk also runs on X, and the problem must be solved there in some > manner. > > It does not. We do not support running the PGTK build on X (the > selection code doesn't work on X, for example), and there is no way to > "touch" the user time on that platform without relying on X11-specific > code. At present, it's not even possible to include gdk/gdkx.h there > due to typedef conflicts with dispextern.h > > I'm surprised to hear that considering that many other GTK > applications manage selections adequately. If the intent of pgtk is to > run only on Wayland, you should break the pgtk build at runtime if > it's running under X11, and probably rename it too --- because "pure > GTK" sounds like it should rely only on things GTK provides and that > it should therefore run anywhere GTK does. If in fact it's just a > Wayland window system implementation, call it that. It does break at runtime when run under X11: just type "C-x h" in a large file (like xdisp.c), and try to insert the region into another program with mouse-2. Other GTK programs run well because simply don't provide the amount of features that Emacs does. Their users don't notice various problems caused by GTK, including "C-S-u" being read as "C-u", or "kp-home" being translated by the input method into "home". But our users do, which is why we do not support X11 on the PGTK builds, since the regular X build works much better. It's documented to only support window systems that aren't X11, such as Wayland and Broadway. > I don't agree. Telling Emacs that a user has interacted with a frame > is not an X specific concept. The point I'm making is that telling Emacs that a user has "interacted" with a frame should not be necessary at all, and should not be part of an API exposed anywhere. Lisp code calls `x-focus-frame'; as a result, the frame is focused and activated. Further more, modern window managers are rather notorious for their draconian "focus stealing prevention", which is probably what we are running into here. Kwin and Mutter apparently ignore all _NET_ACTIVE_WINDOW requests that don't come from a pager when the window being activated belongs to a program different from that of the currently active window. > And even in the context of X11, we should be resetting the user time > generally, not just hacking something up for the special case of > x-focus-frame, because 1) the general approach preserves timestamp > monotonicity, and 2) the user did in fact interact with the frame. Some data being written to an Emacs server socket does not or a timer calling `focus-frame' does not qualify as "user interaction" and is not sufficient reason to set the user time. Timestamp monotonicity does not really matter either, since we are not dealing with X selections, drag-and-drop or other fancy synchronization mechanisms.