From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: UI input unresponsive on macOS Date: Sat, 18 Nov 2017 09:24:17 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <20170103174900.GA49916@breton.holly.idiocy.org> <83zij6esyt.fsf@gnu.org> <83d1g1ecvh.fsf@gnu.org> <20171116193343.GA18478@breton.holly.idiocy.org> <83r2sxggej.fsf@gnu.org> <20171117174226.GA48764@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510964682 27280 195.159.176.226 (18 Nov 2017 00:24:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2017 00:24:42 +0000 (UTC) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Cc: Eli Zaretskii , halley@play-bow.org, gongyi.liao@gmail.com, emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 18 01:24:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFqvr-0006Iq-NF for ged-emacs-devel@m.gmane.org; Sat, 18 Nov 2017 01:24:27 +0100 Original-Received: from localhost ([::1]:48380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFqvy-000089-MU for ged-emacs-devel@m.gmane.org; Fri, 17 Nov 2017 19:24:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFqvs-000084-Nx for emacs-devel@gnu.org; Fri, 17 Nov 2017 19:24:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFqvr-0007oF-SJ for emacs-devel@gnu.org; Fri, 17 Nov 2017 19:24:28 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFqvm-0007fG-JS; Fri, 17 Nov 2017 19:24:22 -0500 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 3AC64F08C6; Sat, 18 Nov 2017 09:24:17 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <20171117174226.GA48764@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220256 Archived-At: >>>>> On Fri, 17 Nov 2017 17:42:26 +0000, Alan Third said: >> > I=E2=80=99m not sure how we could handle that on NS. Perhaps just refu= se >> > to display the dialogue at all, and return nil? >>=20 >> If you can detect this situation, it's possible. But silently >> returning nil might not be a good idea, as it's hard to distinguish >> that from normal return. How about displaying a warning? (You >> cannot easily error out in a thread, so that's not a good option.) > NS GUI elements need to be handled in the main thread and it=E2=80=99s ea= sy > enough to check whether we=E2=80=99re in the main thread before trying to > display the dialogue box. Not just for creating a dialog box, but also for an ordinary Emacs frame (it does not always crash, but it sometimes does). As I said, the Main Thread Checker makes it easier to detect these cases. The Main Thread Checker reports even if you try to move/resize an existing NSWindow in a non-main thread. Actually even -[NSView frame] seems to be black-listed. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp