From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#28872: [PATCH] Fix NS frame resizing issues (bug#40200, bug#28872) Date: Thu, 26 Mar 2020 19:35:20 +0200 Message-ID: References: <20200323235432.GA24426@breton.holly.idiocy.org> <20200325222841.GA60879@breton.holly.idiocy.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_8ABE37B1-12E6-4D69-93EC-806C9201731E" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="37341"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40200@debbugs.gnu.org, 28872@debbugs.gnu.org, aaronjensen@gmail.com To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 26 18:36:22 2020 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 1jHWQY-0009bG-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Mar 2020 18:36:22 +0100 Original-Received: from localhost ([::1]:57068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHWQX-0008MN-NZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Mar 2020 13:36:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42562) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHWQG-0008M9-8h for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 13:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHWQE-0007Mj-OM for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 13:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHWQE-0007MW-Jv for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 13:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHWQE-000415-H4 for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Mar 2020 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28872 X-GNU-PR-Package: emacs Original-Received: via spool by 28872-submit@debbugs.gnu.org id=B28872.158524413315402 (code B ref 28872); Thu, 26 Mar 2020 17:36:02 +0000 Original-Received: (at 28872) by debbugs.gnu.org; 26 Mar 2020 17:35:33 +0000 Original-Received: from localhost ([127.0.0.1]:59591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHWPk-00040F-VS for submit@debbugs.gnu.org; Thu, 26 Mar 2020 13:35:33 -0400 Original-Received: from mail-lf1-f66.google.com ([209.85.167.66]:36223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHWPh-0003zx-K7; Thu, 26 Mar 2020 13:35:30 -0400 Original-Received: by mail-lf1-f66.google.com with SMTP id s1so5582807lfd.3; Thu, 26 Mar 2020 10:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=OSaAjhxQn5iEFIUa+EeyOydIY1+vOSK7yq65cQkeN6A=; b=Hl5P1wFOCKQU7LLTKy6dNxmvERBQDh7h96OGLFreB0Gigx5Mo7yqkmBJGCQzAM9+yI NoBQweWDmA7xDvHfmn2n+dSKx/3ku9/Hk9h3X0sQ65UVH2eVT0ozr2npxmHbVpFS8Ot3 SYO22SZobDFI3bXsQgpqRw2cYyJERNDE9qqnjtdjfpBfGcHBsQvYZjG0jA5f/0keIgwA pyM0gKyRdu3cjJm8+D0bj7UKU8EvIzoxZHj9iZuyn3wnXA3m8p30K7nWtWt9rtb6M9MD DAWWhkZ6v948lCyqNPhSk/Hbhb+ZVrIXTNdqdoTFuJzrlS5p4/aBR6J/ASZYXu2yWTTQ Di7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=OSaAjhxQn5iEFIUa+EeyOydIY1+vOSK7yq65cQkeN6A=; b=XUAga6wPMmhdWHV8i3LL962jgJpSLUePKjUkL79qEbOrfA/l/RuMB7JKgkVrbfGmxe FmACEQU+qzIwfxGxfo3lyx+5Fnb8PLySXTsox3ojVhPsaWb577TUdvxC6OPvs5YdZCWn rMmtkBmllKTIToMTSUgYvjHBkKOyhz+1aQWc9SzDYWlZyKwxy/AZfA9jRLAsgc68P21u Jx/grJ0kvfwMc7XbjwQL/gSGI3izCH66Hxe2jhgONdNPDNO82rKU7U5dE0A7xCIYvKmB tCBQYiyc5s6AUR0NwBCw4Nf+lFRyb9P3cmGgl5Ge5z2Ew9ryArgLEuMJpRbqSd9Uhjlc rQxg== X-Gm-Message-State: ANhLgQ0aeEjLNUgfqw68wKZgsiO2oTuz8CVDW/TVTXUj5ra6PcMQLHBN WAdGHtaNu8EJEgVEj1Ot2sM= X-Google-Smtp-Source: ADFU+vs2M5urRPziuyia3WbUduPXWgZ/KXTfcYMqwfH0jDTo5ZPJa3P6o4XzhN4VXTcmf8mrounLxw== X-Received: by 2002:ac2:4201:: with SMTP id y1mr6670377lfh.92.1585244123414; Thu, 26 Mar 2020 10:35:23 -0700 (PDT) Original-Received: from [192.168.0.102] ([91.206.110.153]) by smtp.gmail.com with ESMTPSA id o4sm1869324lfl.62.2020.03.26.10.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 10:35:22 -0700 (PDT) In-Reply-To: <20200325222841.GA60879@breton.holly.idiocy.org> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:177754 Archived-At: --Apple-Mail=_8ABE37B1-12E6-4D69-93EC-806C9201731E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 26 Mar 2020, at 00:28, Alan Third wrote: > > * src/nsmenu.m (update_frame_tool_bar): Remove reference to > updateFrameSize. > * src/nsterm.h: Remove definition of updateFrameSize. > * src/nsterm.m (ns_set_window_size): > (ns_set_undecorated): > ([EmacsView windowDidResize:]): > ([EmacsView windowDidExitFullScreen]): > (ns_judge_scroll_bars): Remove references to updateFrameSize. > ([EmacsView dealloc]): Unset resize notification. > ([EmacsView updateFrameSize:]): Remove function. > ([EmacsView viewWillStartLiveResize]): > ([EmacsView viewDidResize]): New functions. > ([EmacsView initFrameFromEmacs:]): Set up resize notification. > ([EmacsView toggleFullScreen:]): Set frame to the size of the > contentview, not the whole window, and remove reference to > updateFrameSize. Thanks, Alan! I've installed this patch and will watch for any issues. For now Emacs is crashing on fullscreen frame deletion: 1. emacs -Q 2. C-x 5 2 3. F11 4. C-x 5 0 Backtrace from macos problem reporter is attached. --Apple-Mail=_8ABE37B1-12E6-4D69-93EC-806C9201731E Content-Disposition: attachment; filename=emacs-crash-fs-close.txt Content-Type: text/plain; x-unix-mode=0644; name="emacs-crash-fs-close.txt" Content-Transfer-Encoding: quoted-printable OS Version: Mac OS X 10.15.3 (19D76) Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Note: EXC_CORPSE_NOTIFY VM Regions Near 0x20: --> __TEXT 000000010254b000-0000000102792000 [ 2332K] = r-x/r-x SM=3DCOW /Users/USER/*/Emacs.app/Contents/MacOS/Emacs Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff6d2097fa = __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff6d2c6bc1 pthread_kill = + 432 2 libsystem_c.dylib 0x00007fff6d1203a2 raise + 26 3 org.gnu.Emacs 0x0000000102751769 = terminate_due_to_signal + 153 (emacs.c:404) 4 org.gnu.Emacs 0x00000001027520ab emacs_abort + = 15 5 org.gnu.Emacs 0x0000000102719e70 = ns_term_shutdown + 80 (lisp.h:1586) 6 org.gnu.Emacs 0x00000001026097f4 = shut_down_emacs + 340 (emacs.c:2462) 7 org.gnu.Emacs 0x0000000102751736 = terminate_due_to_signal + 102 (emacs.c:385) 8 org.gnu.Emacs 0x0000000102629fce = handle_fatal_signal + 14 9 org.gnu.Emacs 0x000000010262a051 = deliver_thread_signal + 129 10 org.gnu.Emacs 0x0000000102628a09 = deliver_fatal_thread_signal + 9 11 org.gnu.Emacs 0x000000010262a108 = handle_sigsegv + 168 12 libsystem_platform.dylib 0x00007fff6d2bb42d _sigtramp + = 29 13 ??? 000000000000000000 0 + 0 14 com.apple.CoreFoundation 0x00007fff35a1435f = __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 15 com.apple.CoreFoundation 0x00007fff35a142f3 = ___CFXRegistrationPost1_block_invoke + 63 16 com.apple.CoreFoundation 0x00007fff35a14268 = _CFXRegistrationPost1 + 372 17 com.apple.CoreFoundation 0x00007fff35a13ebe = ___CFXNotificationPost_block_invoke + 97 18 com.apple.CoreFoundation 0x00007fff359e37e2 = -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1575 19 com.apple.CoreFoundation 0x00007fff359e2c82 = _CFXNotificationPost + 1351 20 com.apple.AppKit 0x00007fff32c23719 -[NSView = _postFrameChangeNotification] + 304 21 com.apple.AppKit 0x00007fff32c1c1a9 -[NSView = setFrameSize:] + 2917 22 com.apple.AppKit 0x00007fff32c2dca2 -[NSView = setFrame:] + 423 23 org.gnu.Emacs 0x000000010272027c -[EmacsView = setFrame:] + 60 (nsterm.m:7346) 24 com.apple.AppKit 0x00007fff32c412ee -[NSView = resizeWithOldSuperviewSize:] + 1193 25 com.apple.AppKit 0x00007fff32c40a13 -[NSView = resizeSubviewsWithOldSize:] + 525 26 com.apple.AppKit 0x00007fff32c1bcf6 -[NSView = setFrameSize:] + 1714 27 com.apple.AppKit 0x00007fff32c2dca2 -[NSView = setFrame:] + 423 28 com.apple.AppKit 0x00007fff32c3bd38 = -[NSThemeFrame setStyleMask:] + 874 29 com.apple.AppKit 0x00007fff32c3b89e = __25-[NSWindow setStyleMask:]_block_invoke + 1939 30 com.apple.AppKit 0x00007fff32c3b0b3 = NSPerformVisuallyAtomicChange + 132 31 com.apple.AppKit 0x00007fff32c3afbc -[NSWindow = setStyleMask:] + 184 32 com.apple.AppKit 0x00007fff3328d23d = -[_NSWindowExitFullScreenTransitionController = setupWindowForAfterFullScreenExit] + 106 33 com.apple.AppKit 0x00007fff33509740 = __46-[_NSExitFullScreenTransitionController start]_block_invoke_3 + 57 34 libdispatch.dylib 0x00007fff6d068583 = _dispatch_call_block_and_release + 12 35 libdispatch.dylib 0x00007fff6d06950e = _dispatch_client_callout + 8 36 libdispatch.dylib 0x00007fff6d074bc4 = _dispatch_main_queue_callback_4CF + 1105 37 com.apple.CoreFoundation 0x00007fff35a5de00 = __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 38 com.apple.CoreFoundation 0x00007fff35a1db8a = __CFRunLoopRun + 2370 39 com.apple.CoreFoundation 0x00007fff35a1cbd3 = CFRunLoopRunSpecific + 499 40 com.apple.HIToolbox 0x00007fff3457265d = RunCurrentEventLoopInMode + 292 41 com.apple.HIToolbox 0x00007fff345722a9 = ReceiveNextEventCommon + 356 42 com.apple.HIToolbox 0x00007fff34572127 = _BlockUntilNextEventMatchingListInModeWithFilter + 64 43 com.apple.AppKit 0x00007fff32be2ba4 _DPSNextEvent = + 990 44 com.apple.AppKit 0x00007fff32be1380 = -[NSApplication(NSEvent) = _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 45 com.apple.AppKit 0x00007fff32bd309e = -[NSApplication run] + 658 46 org.gnu.Emacs 0x000000010271a02d -[EmacsApp = run] + 333 (nsterm.m:5644) 47 org.gnu.Emacs 0x0000000102726bcc = ns_read_socket + 668 (nsterm.m:4598) 48 org.gnu.Emacs 0x0000000102617035 gobble_input = + 245 (keyboard.c:6887) 49 org.gnu.Emacs 0x000000010261a01a = detect_input_pending + 250 (lisp.h:1272) 50 org.gnu.Emacs 0x00000001026e23ea = wait_reading_process_output + 3194 (process.c:5491) 51 org.gnu.Emacs 0x00000001025525e8 sit_for + 312 = (dispnew.c:6055) 52 org.gnu.Emacs 0x0000000102611f1a read_char + = 5210 (keyboard.c:2738) 53 org.gnu.Emacs 0x000000010260ef2a = read_key_sequence + 1722 (keyboard.c:9549) 54 org.gnu.Emacs 0x000000010260d72c = command_loop_1 + 1340 (keyboard.c:1350) 55 org.gnu.Emacs 0x00000001026943d7 = internal_condition_case + 263 (eval.c:1357) 56 org.gnu.Emacs 0x000000010261d740 = command_loop_2 + 48 (lisp.h:1272) 57 org.gnu.Emacs 0x0000000102693beb = internal_catch + 267 (eval.c:1118) 58 org.gnu.Emacs 0x0000000102751b35 = command_loop.cold.1 + 69 59 org.gnu.Emacs 0x000000010260c7f3 command_loop = + 131 60 org.gnu.Emacs 0x000000010260c723 = recursive_edit_1 + 115 (keyboard.c:714) 61 org.gnu.Emacs 0x000000010260c97b = Frecursive_edit + 347 (keyboard.c:787) 62 org.gnu.Emacs 0x000000010260b561 main + 7425 = (emacs.c:2036) 63 libdyld.dylib 0x00007fff6d0c27fd start + 1 --Apple-Mail=_8ABE37B1-12E6-4D69-93EC-806C9201731E--