From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#36672: 27.0.50; NS build: Creating child frame leads to empty space Date: Mon, 15 Jul 2019 20:38:31 +0300 Message-ID: <04CF7A6F-C1E7-4FE5-B648-8DA8CBD3B1ED@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_E8A25678-66B8-45D4-8F36-60FE26B9D2E9" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133509"; mail-complaints-to="usenet@blaine.gmane.org" To: 36672@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 19:39:07 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn4wM-000Yap-TL for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 19:39:07 +0200 Original-Received: from localhost ([::1]:41374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn4wL-00007a-UG for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 13:39:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48207) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn4wJ-00007I-4J for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:39:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn4wI-0007X0-0T for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn4wH-0007Wp-Rr for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn4wH-00060B-OI for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 17:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36672 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156321232023042 (code B ref -1); Mon, 15 Jul 2019 17:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 17:38:40 +0000 Original-Received: from localhost ([127.0.0.1]:48957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn4vv-0005zZ-KD for submit@debbugs.gnu.org; Mon, 15 Jul 2019 13:38:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn4vs-0005zQ-RN for submit@debbugs.gnu.org; Mon, 15 Jul 2019 13:38:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48036) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn4vr-000898-UH for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:38:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn4vr-0007JU-1Y for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:38:35 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn4vq-0007Ip-Ma for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:38:34 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id x4so18000721wrt.6 for ; Mon, 15 Jul 2019 10:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=nyBHCgF6RcYharcPdSofHzoYsRKewMzRSvETf8HLCEE=; b=rVwtRSKuZ12pDPn+RIWWBf2IrYV835EQ8wgGWv736VprgyS5YA4lEFuy38WPYfbDwS lj27nIwM9UuwnIbVVv9BgxvQjYiSkO7lkLZyP/t+k7c5FOeP/kE5zst9zk9/zD0hZ4My kZo3ESXMd5hXehmS2LNE2sjwx3KJGBJ1bCL30AsRBvghqv0bmdWjJdzvY7itLkSErn/L fAYTenf62PeRmRw9b020Wb7ufkrGg3IEs0VwdSBjIMPsKrNc9t8ro0rhrB3u6fa//Fo1 /oTZvDVczSXj+nYNj4ULbTiiADYU/+rSTQ9AuAcz3DDUBx/YPpoj6cyP2NU5+ofNd8y/ HbqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=nyBHCgF6RcYharcPdSofHzoYsRKewMzRSvETf8HLCEE=; b=GRVesfxa8pVPZVD56uCTugYs8ZMbAfEiob+FFrwWhIQcLYT6oqkLGkoVAE/q6dFa1m JenDY4NuTuQuEvYYzwfSOstMGBxT2kDkC4yT59RfclpetAtoHdOpPGNT4G4u+rFsOCGR 69pTWecXG8ETND7pExIt/oV8ocpCB8mz9g8dnTt4fVWZIQFbN+ejBQ2HCWA0ycE2wUDv 3ueb4YzCXRxuH6ZhD1PqIw23sRSj+n/ImLFrj3NWrpC6bf3RrL6/ijZ/fLw4MMBYkwpJ BCt01ILlFpcexTiaYYaXAKFVsGjeTReWnS2NaCVkf/kfJmOb7Qy1ArIXuv1ggaQYjvKh h7zQ== X-Gm-Message-State: APjAAAXx4SfEJU1Y4HPhJWX+RW8kxUzot5wdaA1v9cwBf+S38qUF9VFb FRSpfHGj3YZeQMbGf++VXrbU+WK+ X-Google-Smtp-Source: APXvYqz3ITU0wnPj6SeWRoPYpJ86UHP7+5t96CtT0HivA9QeltFbC4cFTXoQ+/eJ65951zwQIw5kqQ== X-Received: by 2002:a5d:5450:: with SMTP id w16mr31405543wrv.128.1563212312933; Mon, 15 Jul 2019 10:38:32 -0700 (PDT) Original-Received: from [192.168.0.100] ([91.206.110.138]) by smtp.gmail.com with ESMTPSA id c78sm24643303wmd.16.2019.07.15.10.38.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 10:38:32 -0700 (PDT) X-Mailer: Apple Mail (2.3445.104.11) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163148 Archived-At: --Apple-Mail=_E8A25678-66B8-45D4-8F36-60FE26B9D2E9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Assume there are only one space - Desktop 1. emacs -Q 2. M-x toggle-frame-fullscreen Now there are two spaces - Desktop and *scratch* 3. eval (make-frame `((parent-frame . ,(window-frame)))) Now there are three spaces: - Desktop - Empty space named *scratch* with emacs menu - *scratch* with emacs frames but without menu Although attached patch solves this problem for me these cases still not handled right way: 1. Removing parent-frame property leaves the frame is same space: (let ((new-frame (make-frame `((parent-frame . ,(window-frame)))))) (modify-frame-parameters new-frame `((parent-frame . nil)))) Maybe child frame must go fullscreen if ex-parent frame is in fullscreen. 2. Setting parent frame after frame creation: (let ((frame (window-frame)) (new-frame (make-frame))) (modify-frame-parameters new-frame `((parent-frame . ,frame)))) Thanks! In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.6.0, NS appkit-1671.50 Version 10.14.5 (Build 18F132)) Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.5 --Apple-Mail=_E8A25678-66B8-45D4-8F36-60FE26B9D2E9 Content-Disposition: attachment; filename=ns-emacs-spaces.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="ns-emacs-spaces.patch" Content-Transfer-Encoding: 7bit diff --git a/src/nsterm.h b/src/nsterm.h index 9773eb3e66..d16588718e 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1274,6 +1274,7 @@ extern char gnustep_base_version[]; /* version tracking */ #if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_7) #define NSFullScreenWindowMask (1 << 14) #define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7) +#define NSWindowCollectionBehaviorFullScreenAuxiliary (1 << 8) #define NSApplicationPresentationFullScreen (1 << 10) #define NSApplicationPresentationAutoHideToolbar (1 << 11) #define NSAppKitVersionNumber10_7 1138 diff --git a/src/nsterm.m b/src/nsterm.m index 02331826d9..cc5921090c 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7365,7 +7375,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_7) #endif - [win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + if (FRAME_PARENT_FRAME (f)) + [win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary]; + else + [win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; #endif wr = [win frame]; --Apple-Mail=_E8A25678-66B8-45D4-8F36-60FE26B9D2E9--