all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36672: 27.0.50; NS build: Creating child frame leads to empty space
@ 2019-07-15 17:38 Andrii Kolomoiets
  2019-07-16 19:28 ` Alan Third
  0 siblings, 1 reply; 16+ messages in thread
From: Andrii Kolomoiets @ 2019-07-15 17:38 UTC (permalink / raw)
  To: 36672

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

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


[-- Attachment #2: ns-emacs-spaces.patch --]
[-- Type: application/octet-stream, Size: 1251 bytes --]

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-03-14  8:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 17:38 bug#36672: 27.0.50; NS build: Creating child frame leads to empty space Andrii Kolomoiets
2019-07-16 19:28 ` Alan Third
2019-07-17  8:39   ` martin rudalics
2019-07-17 18:51   ` Andrii Kolomoiets
2019-07-23 18:14   ` Andrii Kolomoiets
2020-02-14  8:23     ` Andrii Kolomoiets
2020-02-20 23:23       ` Alan Third
2020-03-01 16:16       ` Alan Third
2020-03-10  8:42         ` Andrii Kolomoiets
2020-03-12 23:27           ` Alan Third
2020-03-13  9:38             ` martin rudalics
2020-03-13 15:13               ` Alan Third
2020-03-13 16:29                 ` martin rudalics
2020-03-13 17:45                   ` martin rudalics
2020-03-13 23:53                   ` Alan Third
2020-03-14  8:48                     ` martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.