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 v2] Fix NS frame resizing issues (bug#40200, bug#28872) Date: Fri, 27 Mar 2020 11:45:50 +0200 Message-ID: <7F9C5AFC-02F1-490B-9DA0-6BC7C27A50E5@gmail.com> References: <20200326212125.GA66331@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=_E02126A4-EBA4-4D0B-9407-1D825BA9C2F7" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="18213"; 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 Fri Mar 27 10:46:39 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 1jHlZW-0004eX-Ta for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Mar 2020 10:46:39 +0100 Original-Received: from localhost ([::1]:39116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHlZV-0002QF-SS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Mar 2020 05:46:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHlYy-0002OC-Qb for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 05:46:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHlYx-0005HW-EC for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 05:46:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHlYw-0005H9-T0 for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 05:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHlYw-0002Ol-Ql for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2020 05:46: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: Fri, 27 Mar 2020 09:46: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.15853023629207 (code B ref 28872); Fri, 27 Mar 2020 09:46:02 +0000 Original-Received: (at 28872) by debbugs.gnu.org; 27 Mar 2020 09:46:02 +0000 Original-Received: from localhost ([127.0.0.1]:60535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHlYv-0002OF-Al for submit@debbugs.gnu.org; Fri, 27 Mar 2020 05:46:01 -0400 Original-Received: from mail-lf1-f68.google.com ([209.85.167.68]:39131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHlYt-0002Nv-I6; Fri, 27 Mar 2020 05:46:00 -0400 Original-Received: by mail-lf1-f68.google.com with SMTP id h6so1533649lfp.6; Fri, 27 Mar 2020 02:45:59 -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=HINtA6VbUhJVzgyOpmQLO+2yXD2xlQ2LMBcrdtpOkSk=; b=j+JpbghWXv7G6lvvgdTggvIfj8/7jjpBA0rGqCEWRqUpUYyOtWaXxHdaHdqI1GtKlb w0+D6lHc3WW8qe3H+Zi42pUdzGR1rM/xMdGVNjASOEJKdVftUfHQGGDvV+sBQSDN0icd Iph3A/8XgmpNKZ3RszWse96fh3ecaIxWOS3HK/Uow8oVh882qxtt/KZu2veHZeltGQBg XuXRVdSetlPbnFr5mIjI6JEpIbnJ5Xy8hVYvnJYVYzU1sVT+ph6fG/0YditG1qPZ62UD 8AA34OTrjRgftzIoVoLKHnuYGUzniZ/ZYmB6E0lsYV8ahwEZsKN7CivckQYT/cY2T36X NJcA== 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=HINtA6VbUhJVzgyOpmQLO+2yXD2xlQ2LMBcrdtpOkSk=; b=kdz42ISPY51CIF0fc3W5S/xQQMUw3JEDNxQ818BGsnygcKB2zYRa/H9zM2klQDDs2D yxj6PATHNTppUqkUmGfN/XEbEsFOD/BhMpfra3C5dajfhwtlkamYK4+zI2lABiinHafD YjVowqTql4b7QR46YZvA8+a/ZNVnr+bIrEsW3NySt+UFFf2pWlFIAKpY1UmnS9Z758cL 5z2OVrf6W0hlI2wa/q8LjKZrc3vCg82Fs5djMc9yVsZsmGHMyqO9705moWL3NE510Fga taSJwnadaoua0jQ1+eZ8PrOu75SV/1pdi0M8FklzdqidQeG1za6XXXr+U7N+6qZF/NLD dLgQ== X-Gm-Message-State: ANhLgQ0cWNVs2qwAhJbZvuUWnvRD6CWrnv2303iN179ylJ5cyIf2qAfR RW60HEur6Iy+2gSCCGdFrLk= X-Google-Smtp-Source: ADFU+vtZlmg3Re5Kf5lxB2wLpQLcFCk3zbwbCRN291uqCzP5C1RTWysB2SMfkRZ8cozKqZMhl4KfTQ== X-Received: by 2002:a19:c197:: with SMTP id r145mr8647444lff.8.1585302353108; Fri, 27 Mar 2020 02:45:53 -0700 (PDT) Original-Received: from [192.168.0.102] ([91.206.110.153]) by smtp.gmail.com with ESMTPSA id r21sm2643055ljp.29.2020.03.27.02.45.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 02:45:52 -0700 (PDT) In-Reply-To: <20200326212125.GA66331@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:177778 Archived-At: --Apple-Mail=_E02126A4-EBA4-4D0B-9407-1D825BA9C2F7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 26 Mar 2020, at 23:21, Alan Third wrote: >=20 > Hopefully this works better. >=20 It is! But can the following line be removed? > + ns_clear_frame (emacsframe); This removal resolves following issues for me: 1. Frames have white background color on creation. This flashing is = noticeable while using dark background for default face. 2. I'm experimenting with enabling macos native tabs by replacing = NSWindowTabbingModeDisallowed with NSWindowTabbingModePreferred in = nsterm.m. Crash occurs on tabbed frame deletion (s-n s-w). Backtrace is = attached. Thanks! --Apple-Mail=_E02126A4-EBA4-4D0B-9407-1D825BA9C2F7 Content-Disposition: attachment; filename=emacs-crash-tab-close.txt Content-Type: text/plain; x-unix-mode=0644; name="emacs-crash-tab-close.txt" Content-Transfer-Encoding: quoted-printable Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Note: EXC_CORPSE_NOTIFY VM Regions Near 0x20: --> __TEXT 000000010aac2000-000000010ad09000 [ 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 0x000000010acc87a9 = terminate_due_to_signal + 153 (emacs.c:404) 4 org.gnu.Emacs 0x000000010acc90eb emacs_abort + = 15 5 org.gnu.Emacs 0x000000010ac90f60 = ns_term_shutdown + 80 (lisp.h:1586) 6 org.gnu.Emacs 0x000000010ab808e4 = shut_down_emacs + 340 (emacs.c:2462) 7 org.gnu.Emacs 0x000000010acc8776 = terminate_due_to_signal + 102 (emacs.c:385) 8 org.gnu.Emacs 0x000000010aba10be = handle_fatal_signal + 14 9 org.gnu.Emacs 0x000000010aba1141 = deliver_thread_signal + 129 10 org.gnu.Emacs 0x000000010ab9faf9 = deliver_fatal_thread_signal + 9 11 org.gnu.Emacs 0x000000010aba11f8 = 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 0x000000010ac972ac -[EmacsView = setFrame:] + 60 (nsterm.m:7329) 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 0x00007fff32c604f7 = -[NSThemeFrame _relayoutAuxiliaryViewsOfType:] + 149 29 com.apple.AppKit 0x00007fff32c6044f = -[NSThemeFrame relayoutAuxiliaryViewsOfType:] + 27 30 com.apple.AppKit 0x00007fff32e284fe = -[NSTitlebarViewController removeChildViewControllerAtIndex:] + 430 31 com.apple.AppKit 0x00007fff3341b9f1 = -[NSWindowStackController = _removeTabBarAccessoryViewControllerForWindow:] + 212 32 com.apple.AppKit 0x00007fff3341cc7a = -[NSWindowStackController removeWindow:] + 297 33 com.apple.AppKit 0x00007fff32e988af = -[NSWindow(NSWindowTabbing) _doTabbedWindowCleanupForOrderOut] + 97 34 com.apple.AppKit 0x00007fff3347be55 -[NSWindow = _finishClosingWindow] + 73 35 com.apple.AppKit 0x00007fff32f590cd -[NSWindow = _close] + 352 36 org.gnu.Emacs 0x000000010ac8dd4a = ns_free_frame_resources + 202 (nsterm.m:1705) 37 org.gnu.Emacs 0x000000010ac9fd5a = ns_destroy_window + 106 (nsterm.m:1733) 38 org.gnu.Emacs 0x000000010aad1faa delete_frame = + 1642 (frame.c:2137) 39 org.gnu.Emacs 0x000000010ac0d891 funcall_subr = + 257 40 org.gnu.Emacs 0x000000010ac0ce7b Ffuncall + = 843 41 org.gnu.Emacs 0x000000010ac06459 = Ffuncall_interactively + 73 (callint.c:254) 42 org.gnu.Emacs 0x000000010ac0ce7b Ffuncall + = 843 43 org.gnu.Emacs 0x000000010ac07948 = Fcall_interactively + 5336 44 org.gnu.Emacs 0x000000010ac0d8b1 funcall_subr = + 289 45 org.gnu.Emacs 0x000000010ac0ce7b Ffuncall + = 843 46 org.gnu.Emacs 0x000000010ac50737 = exec_byte_code + 1815 (bytecode.c:633) 47 org.gnu.Emacs 0x000000010ac0ce19 Ffuncall + = 745 48 org.gnu.Emacs 0x000000010ac0d4ec call1 + 44 49 org.gnu.Emacs 0x000000010ab84ab9 = command_loop_1 + 2009 (lisp.h:1272) 50 org.gnu.Emacs 0x000000010ac0b4c7 = internal_condition_case + 263 (eval.c:1357) 51 org.gnu.Emacs 0x000000010ab94830 = command_loop_2 + 48 (lisp.h:1272) 52 org.gnu.Emacs 0x000000010ac0acdb = internal_catch + 267 (eval.c:1118) 53 org.gnu.Emacs 0x000000010acc8b75 = command_loop.cold.1 + 69 54 org.gnu.Emacs 0x000000010ab838e3 command_loop = + 131 55 org.gnu.Emacs 0x000000010ab83813 = recursive_edit_1 + 115 (keyboard.c:714) 56 org.gnu.Emacs 0x000000010ab83a6b = Frecursive_edit + 347 (keyboard.c:787) 57 org.gnu.Emacs 0x000000010ab82651 main + 7425 = (emacs.c:2036) 58 libdyld.dylib 0x00007fff6d0c27fd start + 1 --Apple-Mail=_E02126A4-EBA4-4D0B-9407-1D825BA9C2F7--