From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Mac OS Sierra tab feature breaks C-x 5 2 Date: Thu, 6 Jul 2017 23:16:37 +0100 Message-ID: <20170706221637.GA19607@breton.holly.idiocy.org> References: <191BFCA3-3C5B-4A75-8985-A958E638ADCE@gmail.com> <20170706174204.GA19121@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1499379418 14675 195.159.176.226 (6 Jul 2017 22:16:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Jul 2017 22:16:58 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Paul Michael Reilly , Emacs-Devel devel To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 07 00:16:47 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 1dTF4n-0003BV-8G for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2017 00:16:45 +0200 Original-Received: from localhost ([::1]:53474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTF4s-0000BT-Iw for ged-emacs-devel@m.gmane.org; Thu, 06 Jul 2017 18:16:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTF4m-0000BK-0W for emacs-devel@gnu.org; Thu, 06 Jul 2017 18:16:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTF4k-0003Ax-V0 for emacs-devel@gnu.org; Thu, 06 Jul 2017 18:16:43 -0400 Original-Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:36075) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTF4k-00039x-Ma for emacs-devel@gnu.org; Thu, 06 Jul 2017 18:16:42 -0400 Original-Received: by mail-wr0-x22d.google.com with SMTP id c11so21754326wrc.3 for ; Thu, 06 Jul 2017 15:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=q5AI2AVf+b8An8OhqnI14+pHCzI8OHR6d2xFb20prFQ=; b=P9JGRb6dGeZSpF1lxHztzH9uDY5f5XMFRSNaV697C6s1ntXyrY9foQlvJOSfo6ODbF Gy0jHJwl8GYQ/Jp/xq7KfLJFiTGJjmoUWTESOmJRZLQ7JJsBwHPw0oNUcl1wK8dyTCfR 8q7IFaE9UCD77NYSOyttR2dMKRlFhyW7S8uuIv8tExEmdMvmhomJ5eeQB2xJRMohG9D4 Pp8xd0yrMdTzZKuwS7yykaWk5zpnn9Asgmn4Q1uqA8EzK7LLiANwBsuhVtplMlhHrvnY hlMTIBz6jBQ98jfMqqX1P8X5eH18PG6WDFKX+bOymUuBqiU0lU6+29wIkEUK45REKZQP GQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=q5AI2AVf+b8An8OhqnI14+pHCzI8OHR6d2xFb20prFQ=; b=HH25M+rE/FKflBXZ+lAHdA3pmiObFfqYgd5WJ4BpgSdAyuQVQwyV72XP5I9UnfHNkh sEDx4oR/f7n0fMg5zAq8k+hbgxVnz5Fw0DRiARfWtSU9s0CmN/xZlEZ17kZss0YjIFhQ xahXCY6GGOje7BEpq2CW6HNacHNnGB3JwFdyF5DQBl7zBx8xuD4HtUbPT5mBTuVRd3ba 68inDl3AB8B1lGx8j51AvEGosvI7eHP1kmSH6AEyULlf636DUh8Kr+tCHuypN28rwLVy 1/dtOYqMkJSpj+jRQfqZ213uMIP+p1tlzieNM31NOnKEXzBcviU8jU7yprL2aRd+qMIC noeA== X-Gm-Message-State: AIVw111s3GhwAHrMOi9ikzJ0oVGfd4VuOJ3L7CKG+cHK3jE0+IppOGge ota4xA01N0HxHHyv4R0= X-Received: by 10.28.54.13 with SMTP id d13mr71279wma.124.1499379401570; Thu, 06 Jul 2017 15:16:41 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e9a1-3503-5c3f-d7d9.holly.idiocy.org. [2001:8b0:3f8:8129:e9a1:3503:5c3f:d7d9]) by smtp.gmail.com with ESMTPSA id k75sm1923407wmh.10.2017.07.06.15.16.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 15:16:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170706174204.GA19121@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22d 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:216248 Archived-At: --DocE+STaALJfprDB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Jul 06, 2017 at 06:42:04PM +0100, Alan Third wrote: > We can make it a run time check, which would look something like > > if ([win respondsToSelector: @selector(setTabbingMode)]) > [win setTabbingMode: NSWindowTabbingModeDisallowed]; > > but this will throw up compiler warnings on pre‐Sierra versions of > macOS. I guess that’s maybe just the price to be paid. I’ve attached a patch to master for this. Can someone on macOS 10.11 or below give it a try and confirm that it compiles and runs? -- Alan Third --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Use-a-run-time-check-for-macOS-Sierra-tabbing-suppor.patch" >From c22264617bf4d50116c4e55525935241931c2cf1 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 6 Jul 2017 23:10:49 +0100 Subject: [PATCH] Use a run-time check for macOS Sierra tabbing support * src/nsterm.m (initFrameFromEmacs) [NS_IMPL_COCOA]: Switch from compile-time check to run-time. --- src/nsterm.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index bf83550b3d..f88b279987 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7073,9 +7073,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f /* macOS Sierra automatically enables tabbed windows. We can't allow this to be enabled until it's available on a Free system. Currently it only happens by accident and is buggy anyway. */ -#if defined (NS_IMPL_COCOA) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 - [win setTabbingMode: NSWindowTabbingModeDisallowed]; +#ifdef NS_IMPL_COCOA + if ([win respondsToSelector: @selector(setTabbingMode:)]) + [win setTabbingMode: NSWindowTabbingModeDisallowed]; #endif ns_window_num++; -- 2.12.0 --DocE+STaALJfprDB--