From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Sun, 10 Jan 2021 17:04:57 +0100 Message-ID: <23649b1d-414b-42e7-dbb0-6b63443521ee@gmx.at> References: <50c96c83-01b4-d2b8-ff90-82c9d706e268@gmx.at> <2d91b8cb-0206-32f0-a577-f243fb534aec@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12010"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrii Kolomoiets , emacs-devel@gnu.org, enometh@meer.net, Stefan Monnier , Gregory Heytings , Eli Zaretskii To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 10 17:06:25 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 1kydEX-00031Z-Em for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Jan 2021 17:06:25 +0100 Original-Received: from localhost ([::1]:40394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kydEW-0007G3-EE for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Jan 2021 11:06:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kydDU-0006fS-If for emacs-devel@gnu.org; Sun, 10 Jan 2021 11:05:22 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:41897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kydDQ-00015J-Ul; Sun, 10 Jan 2021 11:05:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610294702; bh=7j4Skt+msMS605Zz1z2GnOTo+365c69JIxPRAdjO1oc=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=gbmydV0DqBaZHcWuYAOyFZx8J82ZpH51dIjNvBuO9+4hxulpO4edhoBMP79m+Sci+ ZH6h9VXaVovyVDBbXcRD45yQocGwqpILaVI5l8UH6li0AQH5EXlVuoHs6kJpENXCs+ IgvRkNoTak0RFMuEbDHh9KS4UkWaZJLIwbwQDtqc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.93]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIx3I-1keMXH2jm6-00KU6c; Sun, 10 Jan 2021 17:05:01 +0100 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:KjmrUqI0vuYIGdI8jbv9Pml4WA4fwqnKt44m/EGUa7c+0snXZal GuZypbCRXtgR5HSJalynpcbfdp9DXKx7XZtdKM5G6ER7wCAcGFeg4YTZmuFoVBv6/HyW2fh 2G4ynoQll4ncbR/5BrUNBxu30L5544FgBT87Nl/zrQRO8IoUyDjJFYDlYVnaCWB5QoDoTYm URnCDG/tQHwL1h17E2jow== X-UI-Out-Filterresults: notjunk:1;V03:K0:YHKTk0xmzyM=:SFsJFL0DjmB8D9tkb5osCs DRi7wr7PybqyJim4bHvhjt/b1GYHPDci3deBc5KIcMAJDKHiAky50B9fp6OsqUH3ws6LiE4pb Wnl4rOReUzc37bcGXoVgc2sdHK/z4Unh7SKfZs7hCVHaxvWZPAD/nbZoVvpYawVMZijYLX+Hj pmI4/ERq0TIkJzRt1EsPdmpckFRsALYTBbchDQenMAgOVPrFbDvOQgI3YmZwzfer65kBW+Dcu QuuB6uQudMSEgWcdesSBGUwoYSApnNKvHZyRjcDigmnYVR1+EK76JQGkQPiBSE3Fl5tcQiUF3 4+7DPsbM4aphvza1bpj2Bw2k1gzveJrYNHzZUpU8DYH0m74+ZbtH52I9d+pt5Cv/BASRVicgP x9m7lGGI3NdFe9rGZY7fS0pIZNfesC1qv3iOuN/gvNna61WV9kkOSIsCtGRv1vV7jQFhMYCLq Cq7hKYAb4d3JH8sYJj2GMvCDrFbRR8poBWQGjEct07e7MWgJYHyKncGSgUXf3xWdGfyr6aevS WUIg/Hb9lfmiCpZK2VjRdTFe15ZPf9zgYzmytO16YgGFSv4FADChFGKlHMNBfWQAqSn9srPV8 d7iwfaVAy0U3UO9dj3GuM5ar9RS1iqYeXwuHS+1wce2mztTAbTf27xuAZBPFxhFcXZBtIRvq5 wlMoNheU8lPKCwTlq++bcTByyY64ACPfMe9a35krTp1Xdll0yWp+y+BBNR1RJO4sJjaKwJZgF IqbwgV2qGLijPUwigKAL1IIkbfSKimRAmiZbfsTNH8+iQ4ZpNyaO8IsRt+ezlYM1IdAqb64Y Received-SPF: pass client-ip=212.227.15.19; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:262853 Archived-At: >> It does call 'raise-frame' something people with 'focus-follows-mouse' t >> (not 'auto-raise') might not want here. And it may have to move the >> mouse cursor according to the 'mouse-autoselect-window' and >> 'focus-follows-mouse' policies. Most window managers don't handle the >> latter well (IIRC only the otherwise abominable mutter and KDE could do >> it approximately). And the former wants the selected window to be set >> up well before calling 'select-frame-set-input-focus'. > > It is nevertheless the standard function to call to move focus to a > different frame. If there are problems with focus-follows-mouse, they > should surely be fixed in frame.el as a separate problem. The 'focus-follows-mouse' problem is a window manager problem and cannot be fixed in frame.el. It typically happens when he mouse pointer is (i) over frame-1, one (ii) gives focus to frame-2 and (iii) moves the mouse which causes the WM to refocus frame-1. Some WMs here move the mouse pointer in (ii) to frame-2 (and forcefully do that for pop up windows) which can be however a pain for Emacs because the WM doesn't know where in frame-2 to move it to and so with 'mouse-autoselect-window' a wrong window may get auto-selected. And please remain aware of the fact that focus stealing is, in general, considered bad practice. It shouldn't happen in the case at hand because _some_ Emacs frame should already have focus when invoking 'select-frame-set-input-focus'. Still, a window manager's local policy settings might make it refrain from giving focus to some frame on behalf of our request. martin