From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: UI input unresponsive on macOS Date: Fri, 17 Nov 2017 15:53:56 +0200 Message-ID: <83r2sxggej.fsf@gnu.org> References: <72DF4592-73FE-452D-9CF3-C892E73BD36E@play-bow.org> <20170103143621.GA41725@breton.holly.idiocy.org> <20170103174900.GA49916@breton.holly.idiocy.org> <83zij6esyt.fsf@gnu.org> <83d1g1ecvh.fsf@gnu.org> <20171116193343.GA18478@breton.holly.idiocy.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1510927188 6261 195.159.176.226 (17 Nov 2017 13:59:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Nov 2017 13:59:48 +0000 (UTC) Cc: gongyi.liao@gmail.com, halley@play-bow.org, mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 17 14:59:44 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 1eFhBD-00014P-65 for ged-emacs-devel@m.gmane.org; Fri, 17 Nov 2017 14:59:39 +0100 Original-Received: from localhost ([::1]:46052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFhBK-0005vt-DV for ged-emacs-devel@m.gmane.org; Fri, 17 Nov 2017 08:59:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFh6C-0001SG-7I for emacs-devel@gnu.org; Fri, 17 Nov 2017 08:54:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFh69-0001fC-Io for emacs-devel@gnu.org; Fri, 17 Nov 2017 08:54:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFh69-0001f0-Db; Fri, 17 Nov 2017 08:54:25 -0500 Original-Received: from [176.228.60.248] (port=2938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFh67-0005aC-Ix; Fri, 17 Nov 2017 08:54:25 -0500 In-reply-to: <20171116193343.GA18478@breton.holly.idiocy.org> (message from Alan Third on Thu, 16 Nov 2017 19:33:43 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:220248 Archived-At: > Date: Thu, 16 Nov 2017 19:33:43 +0000 > From: Alan Third > Cc: Gong-Yi Liao 廖宮毅 , > Eli Zaretskii , halley@play-bow.org, > emacs-devel@gnu.org > > > (make-thread > > (lambda () > > (let (last-nonmenu-event) > > (setq test (y-or-n-p-with-timeout "test" 2 'timeout))))) > > > > Athena: Works. > > GTK+2: Timeout works, but buttons are not displayed. > > GTK+3: Hangs. > > NS: Crashes. > > I’m not sure how we could handle that on NS. Perhaps just refuse to > display the dialogue at all, and return nil? 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.)