GNU bug report logs - #36672
27.0.50; NS build: Creating child frame leads to empty space

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Andrii Kolomoiets <andreyk.mad@HIDDEN>; dated Mon, 15 Jul 2019 17:39:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 17:38:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 13:38:39 2019
Received: from localhost ([127.0.0.1]:48957 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hn4vv-0005zZ-KD
	for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 13:38:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:37774)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreyk.mad@HIDDEN>) id 1hn4vs-0005zQ-RN
 for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 13:38:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48036)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <andreyk.mad@HIDDEN>) id 1hn4vr-000898-UH
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 13:38:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreyk.mad@HIDDEN>) id 1hn4vr-0007JU-1Y
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 13:38:35 -0400
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 <andreyk.mad@HIDDEN>)
 id 1hn4vq-0007Ip-Ma
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 13:38:34 -0400
Received: by mail-wr1-x42c.google.com with SMTP id x4so18000721wrt.6
 for <bug-gnu-emacs@HIDDEN>; 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)
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 <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 15 Jul 2019 10:38:32 -0700 (PDT)
From: Andrii Kolomoiets <andreyk.mad@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_E8A25678-66B8-45D4-8F36-60FE26B9D2E9"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Subject: 27.0.50; NS build: Creating child frame leads to empty space
Message-Id: <04CF7A6F-C1E7-4FE5-B648-8DA8CBD3B1ED@HIDDEN>
Date: Mon, 15 Jul 2019 20:38:31 +0300
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3445.104.11)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::42c
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


--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--




Acknowledgement sent to Andrii Kolomoiets <andreyk.mad@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36672; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 15 Jul 2019 17:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.