From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#67694: 30.0.50; tool-bar Date: Sat, 16 Dec 2023 20:13:12 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20372"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Konrad Podczeck , 67694@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 16 21:14:26 2023 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 1rEb3J-00053u-Ij for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Dec 2023 21:14:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEb2z-0002A6-SF; Sat, 16 Dec 2023 15:14:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEb2v-00026q-Vg for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 15:14:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEb2v-0000jR-NT for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 15:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEb2w-0002ft-7J for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2023 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67694 X-GNU-PR-Package: emacs Original-Received: via spool by 67694-submit@debbugs.gnu.org id=B67694.170275760610230 (code B ref 67694); Sat, 16 Dec 2023 20:14:02 +0000 Original-Received: (at 67694) by debbugs.gnu.org; 16 Dec 2023 20:13:26 +0000 Original-Received: from localhost ([127.0.0.1]:56122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEb2M-0002ev-C7 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 15:13:26 -0500 Original-Received: from dane.soverin.net ([185.233.34.148]:58047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEb2H-0002ef-BD for 67694@debbugs.gnu.org; Sat, 16 Dec 2023 15:13:25 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4Ssy2L1XVdz2xGQ; Sat, 16 Dec 2023 20:13:14 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4Ssy2K25XxzHv; Sat, 16 Dec 2023 20:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1702757594; bh=U8Rf1c6LpYNHCq4mjj3UyL4RXwL9QMXL3dSOYShRY5E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kqJY7CzeQzdmt888c8Itq7bo27Jf0c52fYfef1ZyQNVAWyZVaMQr82ZM9SfH01qpI iWYSIBRnnGpfWKK35ipIkCQU0pUc4QrgZYCct96UNFd95lFL0zwb6fF5MXUIcE6axe A0zrkN34HmwBQgMxhdLZn0w05iZYLouuFXHIy/fXBQZVp84oa33muhxrh1G/JseoTr 4k21vhe4NPKEOsqx+RlOKIOsHDrgjJ/aC67x8hS1prNruTQ7NZ/TzFKrO7xlbrwJl2 Qm56pBJ80rv+uyMcwRJQLc2SyYFUXI8Jx035nakQo7ccvU8KsvMMR1ajwcP4tqc6hh enVZU6q+j0oVQ== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.96) (envelope-from ) id 1rEb28-000CAw-2Z; Sat, 16 Dec 2023 20:13:12 +0000 Mail-Followup-To: Alan Third , Daniel =?UTF-8?Q?Mart=C3=ADn?= , Konrad Podczeck , 67694@debbugs.gnu.org Content-Disposition: inline In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276380 Archived-At: On Sat, Dec 16, 2023 at 02:15:05PM +0100, Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Konrad Podczeck writes: > > > In nsterm.m, deleting the lines of code > > > > > > #ifdef NS_IMPL_COCOA > > if (! send_appdefined) > > { > > /* OS X 10.10.1 swallows the AppDefined event we are sending ourselves > > in certain situations (rapid incoming events). > > So check if we have one, if not add one. */ > > NSEvent *appev = [NSApp nextEventMatchingMask:NSEventMaskApplicationDefined > > untilDate:[NSDate distantPast] > > inMode:NSDefaultRunLoopMode > > dequeue:NO]; > > if (! appev) send_appdefined = YES; > > } > > #endif > > > > as done in commit 6acb3c5b05a7b9fb32a5336e1bb740f527571ae9 on > > 23-09-11, seems to be incompatible with macos Sonoma or Monterey. In > > both versions, and with both an M1 processor and an Intel one, I got > > the following problem, with these lines of code removed. I have > > pdf-tools installed, and via the code in windows.el, I have both the > > pdf output and some latex source code to appear in their own frames. I > > also have a managed to have a tool-bar in the frame showing the > > pdf-outout, with an icon for going from one page to the next. Now if I > > repeatedly click with the mouse on this icon very fast, then, after 3 > > to 5 clicks, the whole emacs.app begins to hang. This is not so with > > the above lines of code still present in nsterm.m. > > Could you describe the steps to reproduce this bug in more detail? Does > it happen only when using the pdf-tools package? > > Starting from emacs -Q, I’ve installed the pdf-tools package (M-x > package-install RET pdf-tools RET), but, after visiting a PDF file, I > don’t see any tool-bar icons to go to the previous and next page in the > PDF. I hate this application defined event malarkey, but I was never able to come up with a better solution. The problem described in the removed comment certainly looks like an Apple bug, but if it is then surely it would have been fixed by now. Konrad, are you able to try changing the code thus (the line numbers are probably wrong): modified src/nsterm.m @@ -4604,10 +4604,16 @@ Function modeled after x_draw_glyph_string_box (). data1: value data2: 0]; - /* Post an application defined event on the event queue. When this is - received the [NXApp run] will return, thus having processed all - events which are currently queued. */ - [NSApp postEvent: nxev atStart: NO]; + if (! nxev) + { + NSLog(@"Something has stopped us creating an event."); + send_appdefined = YES; + } + else + /* Post an application defined event on the event queue. When this is + received the [NXApp run] will return, thus having processed all + events which are currently queued. */ + [NSApp postEvent: nxev atStart: NO]; } } See if the log message prints, and/or whether it solves the problem. -- Alan Third