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: Tue, 23 Jul 2019 21:14:19 +0300 Message-ID: References: <04CF7A6F-C1E7-4FE5-B648-8DA8CBD3B1ED@gmail.com> <20190716192822.GA63701@breton.holly.idiocy.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_A3D226A6-99FF-4758-A3D3-1E8EC325CD41" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="228988"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36672@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 23 20:15:08 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 1hpzJc-000xQs-5W for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2019 20:15:08 +0200 Original-Received: from localhost ([::1]:46470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpzJb-0008Fk-89 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2019 14:15:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36304) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpzJX-0008Fc-JG for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 14:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpzJW-0000KY-KT for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 14:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpzJW-0000KH-F0 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 14:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpzJW-0006Zo-74 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 14:15: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: Tue, 23 Jul 2019 18:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36672 X-GNU-PR-Package: emacs Original-Received: via spool by 36672-submit@debbugs.gnu.org id=B36672.156390567025220 (code B ref 36672); Tue, 23 Jul 2019 18:15:02 +0000 Original-Received: (at 36672) by debbugs.gnu.org; 23 Jul 2019 18:14:30 +0000 Original-Received: from localhost ([127.0.0.1]:35605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpzJ0-0006Yi-Bw for submit@debbugs.gnu.org; Tue, 23 Jul 2019 14:14:30 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:35196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpzIx-0006YR-Sl for 36672@debbugs.gnu.org; Tue, 23 Jul 2019 14:14:28 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id y4so44205455wrm.2 for <36672@debbugs.gnu.org>; Tue, 23 Jul 2019 11:14:27 -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=KKrw1ngpsdb1pM8pIjwxA9sLg57yTQPmek8L+PzqTig=; b=drlCKcGvS+8slNnXxLmcDzWSrmh4MW/yOujHMtCck/r5Iy0ZPuX0Xp9EZDQ3Fx5QOr RVmL2vVcFGm3nAA+u6it4hwZ18E4uSoSLYIMKubbSjfuia9djdf7cweha4h4GvGlsElM 3BaUxX0lAyMsTGhsCjx38ol7nfwdM61QseMEY11Zv9qdhe6zjg9DCgFLJtpQckpcjeR7 3ldgO2AEVy4U+5wrIbKX0UwMw3LjIxiKGFPKHWan2VeaHrJhfGpFq8NmjhFrHdMuVejT PscMXguL73giiVjZ6ASBWOrzt154BBbi6U4XXmsjBsniXXVErNRcrNVc3sk/LZU2SH0g uLFQ== 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=KKrw1ngpsdb1pM8pIjwxA9sLg57yTQPmek8L+PzqTig=; b=t2Nx5IdEN0WbcIAxfZIrI9OeguJU3Muf1JNpgt8nDHszZU01nJNwnvsAMtcGx2Corj QKRaajPS7PA8osehSGxPjKNle+puolktFHRZ4avGicn7RttwjR2aHsVHhoL38lUKAEKF xUMBjTOXiKzIAW6rI8g5/T3/iznUscYHVuSLqiaerphS2wF9fKtyGj8u93xCkmx06ONQ ZV+cwomzRiSZRNFI5DXAaCCTsQsMxSpflq47tAB7eLtYt1QFTjC1ovUG4vPQfkfPbA/A rOQb7Wb5bGBSLDl+Q6SvSFS8o21rjCDhEh/ix32fVNWi3gtBJbbp5GuzL10MaLi1bk+F V4QQ== X-Gm-Message-State: APjAAAWXwQIh+Ma3/9zjUtycr8Kyvl38zzawaaZMg0Dj5QK3AXXUo4q3 9Q26DHjUhJxGJVnW8QZECBs= X-Google-Smtp-Source: APXvYqwfiahZ9L9O2z5o3yZzjESErq3o2DvebX9iW9ZBDC4afgq5Bp0fPR49kmWZ6bq1APqQsVS5Jw== X-Received: by 2002:a5d:470e:: with SMTP id y14mr57712036wrq.308.1563905662085; Tue, 23 Jul 2019 11:14:22 -0700 (PDT) Original-Received: from [192.168.0.100] ([91.206.110.141]) by smtp.gmail.com with ESMTPSA id x20sm97373597wrg.10.2019.07.23.11.14.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2019 11:14:21 -0700 (PDT) In-Reply-To: <20190716192822.GA63701@breton.holly.idiocy.org> X-Mailer: Apple Mail (2.3445.104.11) 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:163641 Archived-At: --Apple-Mail=_A3D226A6-99FF-4758-A3D3-1E8EC325CD41 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jul 16, 2019, at 22:28, Alan Third wrote: > > The patch looks good to me, but lets see if we can find solutions to > these other issues. I made some progress on this issue. The idea is to wait for fullscreen transition to complete: - Set property isFullScreenTransition on windowWillEnterFullScreen and windowWillExitFullScreen events; - Clear that property on windowDidEnterFullScreen and windowDidExitFullScreen events; - Wait for property to be cleared when we need to. Removing parent-frame property causes child frame to enter fullscreen if some of parent frames is in fullscreen. Setting parent-frame property to fullscreen window causes window to leave fullscreen. As a side effect (sleep-for 0.5) in toggle-frame-fullscreen is no longer needed (bug#28496). But I need help with some questions: 1. Is it the rigth way to wait for some NS event by calling wait_reading_process_output or is there a better way? 2. I commented some code in windowDidMove with FIXME comment. After windowDidMove event is triggered, windowDidExitFullScreen is not received and fullscreen transition is never "completed". With that code commented windowDidExitFullScreen is received. Is this code somehow breaks the events queue? Actually it is the first time I'm working with the C side of Emacs. And with AppKit. And with C :) Please let me know if my decisions and conclusions are wrong. Thanks! --Apple-Mail=_A3D226A6-99FF-4758-A3D3-1E8EC325CD41 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: quoted-printable diff=20--git=20a/lisp/frame.el=20b/lisp/frame.el=0Aindex=20= fd7e872fb6..325b4c07c5=20100644=0A---=20a/lisp/frame.el=0A+++=20= b/lisp/frame.el=0A@@=20-2629,11=20+2629,7=20@@=20toggle-frame-fullscreen=0A= =20=09=20=20=20=20=20=20(set-frame-parameter=20frame=20'fullscreen=20= fullscreen-restore)=0A=20=09=20=20=20=20(set-frame-parameter=20frame=20= 'fullscreen=20nil)))=0A=20=20=20=20=20=20=20(modify-frame-parameters=0A-=20= =20=20=20=20=20=20frame=20`((fullscreen=20.=20fullboth)=20= (fullscreen-restore=20.=20,fullscreen))))=0A-=20=20=20=20;;=20= Manipulating=20a=20frame=20without=20waiting=20for=20the=20fullscreen=0A= -=20=20=20=20;;=20animation=20to=20complete=20can=20cause=20a=20crash,=20= or=20other=20unexpected=0A-=20=20=20=20;;=20behavior,=20on=20macOS=20= (bug#28496).=0A-=20=20=20=20(when=20(featurep=20'cocoa)=20(sleep-for=20= 0.5))))=0A+=20=20=20=20=20=20=20frame=20`((fullscreen=20.=20fullboth)=20= (fullscreen-restore=20.=20,fullscreen))))))=0A=20=0A=20=0C=0A=20;;;;=20= Key=20bindings=0Adiff=20--git=20a/src/nsterm.h=20b/src/nsterm.h=0Aindex=20= 9773eb3e66..9391e31b48=20100644=0A---=20a/src/nsterm.h=0A+++=20= b/src/nsterm.h=0A@@=20-417,6=20+417,7=20@@=20#define=20= NSTRACE_UNSILENCE()=0A=20=20=20=20int=20maximized_width,=20= maximized_height;=0A=20=20=20=20NSWindow=20*nonfs_window;=0A=20=20=20=20= BOOL=20fs_is_native;=0A+=20=20=20BOOL=20is_fullscreen_transition;=0A=20= @public=0A=20=20=20=20struct=20frame=20*emacsframe;=0A=20=20=20=20int=20= rows,=20cols;=0A@@=20-448,6=20+449,8=20@@=20#define=20= NSTRACE_UNSILENCE()=0A=20-=20(void)=20toggleFullScreen:=20(id)=20sender;=0A= =20-=20(BOOL)=20fsIsNative;=0A=20-=20(BOOL)=20isFullscreen;=0A+-=20= (BOOL)=20isFullScreenTransition;=0A+-=20(void)=20= waitFullScreenTransition;=0A=20#if=20defined=20(NS_IMPL_COCOA)=20&&=20= MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=201070=0A=20-=20(void)=20= updateCollectionBehavior;=0A=20#endif=0A@@=20-1274,6=20+1277,7=20@@=20= #define=20SCREENMAXBOUND(x)=20(IN_BOUND=20(-SCREENMAX,=20x,=20= SCREENMAX))=0A=20#if=20!defined=20(NS_IMPL_COCOA)=20||=20!defined=20= (MAC_OS_X_VERSION_10_7)=0A=20#define=20NSFullScreenWindowMask=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(1=20<<=2014)=0A=20= #define=20NSWindowCollectionBehaviorFullScreenPrimary=20(1=20<<=207)=0A= +#define=20NSWindowCollectionBehaviorFullScreenAuxiliary=20(1=20<<=208)=0A= =20#define=20NSApplicationPresentationFullScreen=20=20=20=20=20=20=20=20=20= (1=20<<=2010)=0A=20#define=20NSApplicationPresentationAutoHideToolbar=20=20= =20=20(1=20<<=2011)=0A=20#define=20NSAppKitVersionNumber10_7=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=201138=0Adiff=20--git=20= a/src/nsterm.m=20b/src/nsterm.m=0Aindex=2002331826d9..df6a0aab80=20= 100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A@@=20-1495,9=20= +1495,11=20@@=20-(void)remove=0A=20=0A=20=20=20=20=20=20=20/*=20Making=20= a=20new=20frame=20from=20a=20fullscreen=20frame=20will=20make=20the=20= new=20frame=0A=20=20=20=20=20=20=20=20=20=20fullscreen=20also.=20=20So=20= skip=20handleFS=20as=20this=20will=20print=20an=20error.=20=20*/=0A-=20=20= =20=20=20=20if=20([view=20fsIsNative]=20&&=20f->want_fullscreen=20=3D=3D=20= FULLSCREEN_BOTH=0A-=20=20=20=20=20=20=20=20=20=20&&=20[view=20= isFullscreen])=0A+=20=20=20=20=20=20if=20([view=20fsIsNative]=20&&=20= [view=20isFullscreen])=20{=0A+=20=20=20=20=20=20=20=20//=20maybe=20it=20= is=20not=20necessary=20to=20wait=0A+=20=20=20=20=20=20=20=20[view=20= waitFullScreenTransition];=0A=20=20=20=20=20=20=20=20=20return;=0A+=20=20= =20=20=20=20}=0A=20=0A=20=20=20=20=20=20=20if=20(f->want_fullscreen=20!=3D= =20FULLSCREEN_NONE)=0A=20=20=20=20=20=20=20=20=20{=0A@@=20-1882,19=20= +1884,52=20@@=20so=20some=20key=20presses=20(TAB)=20are=20swallowed=20by=20= the=20system.=20=20*/=0A=20=20=20=20=20=20=20block_input=20();=0A=20=20=20= =20=20=20=20child=20=3D=20[FRAME_NS_VIEW=20(f)=20window];=0A=20=0A+#if=20= defined=20(NS_IMPL_COCOA)=20&&=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20= 1070=0A+=20=20=20=20=20=20EmacsView=20*view=20=3D=20(EmacsView=20= *)FRAME_NS_VIEW=20(f);=0A+#endif=0A+=0A=20=20=20=20=20=20=20if=20([child=20= parentWindow]=20!=3D=20nil)=0A=20=20=20=20=20=20=20=20=20{=0A+#if=20= defined=20(NS_IMPL_COCOA)=20&&=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20= 1070=0A+=20=20=20=20=20=20=20=20=20=20parent=20=3D=20[child=20= parentWindow];=0A+#endif=0A+=0A=20=20=20=20=20=20=20=20=20=20=20[[child=20= parentWindow]=20removeChildWindow:child];=0A=20#if=20defined=20= (NS_IMPL_COCOA)=20&&=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20101000=0A=20= #if=20MAC_OS_X_VERSION_MIN_REQUIRED=20<=20101000=0A=20=20=20=20=20=20=20=20= =20=20=20if=20([child=20= respondsToSelector:@selector(setAccessibilitySubrole:)])=0A=20#endif=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20[child=20= setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole];=0A+#endif=0A= +#if=20defined=20(NS_IMPL_COCOA)=20&&=20MAC_OS_X_VERSION_MAX_ALLOWED=20= >=3D=201070=0A+=20=20=20=20=20=20=20=20=20=20if=20(NILP=20(new_value))=20= {=0A+=20=20=20=20=20=20=20=20=20=20=20=20NSTRACE=20("child=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary");=0A+=20= =20=20=20=20=20=20=20=20=20=20=20[child=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];=0A+=20= =20=20=20=20=20=20=20=20=20=20=20//=20if=20current=20parent=20in=20= fullscreen=20and=20no=20new=20parent=20make=20child=20fullscreen=0A+=20=20= =20=20=20=20=20=20=20=20=20=20while=20(parent)=20{=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20if=20(([parent=20styleMask]=20&=20= NSWindowStyleMaskFullScreen)=20!=3D=200){=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20[view=20toggleFullScreen:child];=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20break;=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20}=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20//=20check=20all=20= parents=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20parent=20=3D=20= [parent=20parentWindow];=0A+=20=20=20=20=20=20=20=20=20=20=20=20}=0A+=20=20= =20=20=20=20=20=20=20=20}=0A=20#endif=0A=20=20=20=20=20=20=20=20=20}=0A=20= =0A=20=20=20=20=20=20=20if=20(!NILP=20(new_value))=0A=20=20=20=20=20=20=20= =20=20{=0A+#if=20defined=20(NS_IMPL_COCOA)=20&&=20= MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=201070=0A+=20=20=20=20=20=20=20=20=20= =20//=20child=20frame=20must=20not=20be=20in=20fullscreen=0A+=20=20=20=20= =20=20=20=20=20=20if=20([view=20fsIsNative]=20&&=20[view=20= isFullscreen]){=0A+=20=20=20=20=20=20=20=20=20=20=20=20//=20in=20case=20= child=20is=20going=20fullscreen=0A+=20=20=20=20=20=20=20=20=20=20=20=20= [view=20waitFullScreenTransition];=0A+=20=20=20=20=20=20=20=20=20=20=20=20= [view=20toggleFullScreen:child];=0A+=20=20=20=20=20=20=20=20=20=20}=0A+=20= =20=20=20=20=20=20=20=20=20NSTRACE=20("child=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary");=0A= +=20=20=20=20=20=20=20=20=20=20[child=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];=0A= +#endif=0A=20=20=20=20=20=20=20=20=20=20=20parent=20=3D=20[FRAME_NS_VIEW=20= (p)=20window];=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20[parent=20= addChildWindow:=20child=0A@@=20-7336,6=20+7371,7=20@@=20-=20= (instancetype)=20initFrameFromEmacs:=20(struct=20frame=20*)f=0A=20#endif=0A= =20=20=20=20=20fs_is_native=20=3D=20ns_use_native_fullscreen;=0A=20= #endif=0A+=20=20is_fullscreen_transition=20=3D=20NO;=0A=20=0A=20=20=20= maximized_width=20=3D=20maximized_height=20=3D=20-1;=0A=20=20=20= nonfs_window=20=3D=20nil;=0A@@=20-7365,7=20+7401,10=20@@=20-=20= (instancetype)=20initFrameFromEmacs:=20(struct=20frame=20*)f=0A=20#if=20= MAC_OS_X_VERSION_MIN_REQUIRED=20<=201070=0A=20=20=20if=20= (NSAppKitVersionNumber=20>=3D=20NSAppKitVersionNumber10_7)=0A=20#endif=0A= -=20=20=20=20[win=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];=0A+=20= =20=20=20if=20(FRAME_PARENT_FRAME=20(f))=0A+=20=20=20=20=20=20[win=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];=0A= +=20=20=20=20else=0A+=20=20=20=20=20=20[win=20= setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];=0A=20= #endif=0A=20=0A=20=20=20wr=20=3D=20[win=20frame];=0A@@=20-7496,11=20= +7535,12=20@@=20-=20(void)windowDidMove:=20sender=0A=20=20=20=20=20=20=20= emacsframe->top_pos=20=3D=0A=20=20=20=20=20=20=20=20=20= NS_PARENT_WINDOW_TOP_POS=20(emacsframe)=20-=20(r.origin.y=20+=20= r.size.height);=0A=20=0A-=20=20=20=20=20=20if=20(emacs_event)=0A-=20=20=20= =20=20=20=20=20{=0A-=20=20=20=20=20=20=20=20=20=20emacs_event->kind=20=3D=20= MOVE_FRAME_EVENT;=0A-=20=20=20=20=20=20=20=20=20=20EV_TRAILER=20= ((id)nil);=0A-=20=20=20=20=20=20=20=20}=0A+=20=20=20=20=20=20//=20FIXME:=20= after=20event=20part=20below=20didExitFullScreen=20is=20not=20received=0A= +=20=20=20=20=20=20//=20if=20(emacs_event)=0A+=20=20=20=20=20=20//=20=20=20= {=0A+=20=20=20=20=20=20//=20=20=20=20=20emacs_event->kind=20=3D=20= MOVE_FRAME_EVENT;=0A+=20=20=20=20=20=20//=20=20=20=20=20EV_TRAILER=20= ((id)nil);=0A+=20=20=20=20=20=20//=20=20=20}=0A=20=20=20=20=20}=0A=20}=0A= =20=0A@@=20-7700,6=20+7740,7=20@@=20-=20= (NSApplicationPresentationOptions)window:(NSWindow=20*)window=0A=20-=20= (void)windowWillEnterFullScreen:(NSNotification=20*)notification=0A=20{=0A= =20=20=20NSTRACE=20("[EmacsView=20windowWillEnterFullScreen:]");=0A+=20=20= is_fullscreen_transition=20=3D=20YES;=0A=20=20=20[self=20= windowWillEnterFullScreen];=0A=20}=0A=20-=20= (void)windowWillEnterFullScreen=20/*=20provided=20for=20direct=20calls=20= */=0A@@=20-7712,6=20+7753,7=20@@=20-=20= (void)windowDidEnterFullScreen:(NSNotification=20*)notification=0A=20{=0A= =20=20=20NSTRACE=20("[EmacsView=20windowDidEnterFullScreen:]");=0A=20=20=20= [self=20windowDidEnterFullScreen];=0A+=20=20is_fullscreen_transition=20=3D= =20NO;=0A=20}=0A=20=0A=20-=20(void)windowDidEnterFullScreen=20/*=20= provided=20for=20direct=20calls=20*/=0A@@=20-7750,6=20+7792,7=20@@=20-=20= (void)windowDidEnterFullScreen=20/*=20provided=20for=20direct=20calls=20= */=0A=20-=20(void)windowWillExitFullScreen:(NSNotification=20= *)notification=0A=20{=0A=20=20=20NSTRACE=20("[EmacsView=20= windowWillExitFullScreen:]");=0A+=20=20is_fullscreen_transition=20=3D=20= YES;=0A=20=20=20[self=20windowWillExitFullScreen];=0A=20}=0A=20=0A@@=20= -7769,6=20+7812,7=20@@=20-=20= (void)windowDidExitFullScreen:(NSNotification=20*)notification=0A=20{=0A=20= =20=20NSTRACE=20("[EmacsView=20windowDidExitFullScreen:]");=0A=20=20=20= [self=20windowDidExitFullScreen];=0A+=20=20is_fullscreen_transition=20=3D=20= NO;=0A=20}=0A=20=0A=20-=20(void)windowDidExitFullScreen=20/*=20provided=20= for=20direct=20calls=20*/=0A@@=20-7798,6=20+7842,21=20@@=20-=20= (void)windowDidExitFullScreen=20/*=20provided=20for=20direct=20calls=20= */=0A=20=20=20=20=20[[self=20window]=20performZoom:self];=0A=20}=0A=20=0A= +-=20(BOOL)isFullScreenTransition=0A+{=0A+=20=20return=20= is_fullscreen_transition;=0A+}=0A+=0A+-=20(void)waitFullScreenTransition=0A= +{=0A+#if=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=201070=0A+=20=20while=20= ([self=20isFullScreenTransition]){=0A+=20=20=20=20NSTRACE=20("wait=20for=20= fullscreen");=0A+=20=20=20=20wait_reading_process_output=20(0,=20= 300000000,=200,=201,=20Qnil,=20NULL,=200);=0A+=20=20}=0A+#endif=0A+}=0A+=0A= =20-=20(BOOL)fsIsNative=0A=20{=0A=20=20=20return=20fs_is_native;=0A@@=20= -7835,10=20+7894,17=20@@=20-=20(void)updateCollectionBehavior=0A=20=20=20= =20=20{=0A=20=20=20=20=20=20=20NSWindow=20*win=20=3D=20[self=20window];=0A= =20=20=20=20=20=20=20NSWindowCollectionBehavior=20b=20=3D=20[win=20= collectionBehavior];=0A-=20=20=20=20=20=20if=20= (ns_use_native_fullscreen)=0A-=20=20=20=20=20=20=20=20b=20|=3D=20= NSWindowCollectionBehaviorFullScreenPrimary;=0A-=20=20=20=20=20=20else=0A= +=20=20=20=20=20=20if=20(ns_use_native_fullscreen)=20{=0A+=20=20=20=20=20= =20=20=20=20=20if=20([win=20parentWindow])=20{=0A+=20=20=20=20=20=20=20=20= =20=20=20=20b=20&=3D=20~NSWindowCollectionBehaviorFullScreenPrimary;=0A+=20= =20=20=20=20=20=20=20=20=20=20=20b=20|=3D=20= NSWindowCollectionBehaviorFullScreenAuxiliary;=0A+=20=20=20=20=20=20=20=20= =20=20}=20else=20{=0A+=20=20=20=20=20=20=20=20=20=20=20=20b=20|=3D=20= NSWindowCollectionBehaviorFullScreenPrimary;=0A+=20=20=20=20=20=20=20=20=20= =20=20=20b=20&=3D=20~NSWindowCollectionBehaviorFullScreenAuxiliary;=0A+=20= =20=20=20=20=20=20=20=20=20}=0A+=20=20=20=20=20=20}=20else=20{=0A=20=20=20= =20=20=20=20=20=20b=20&=3D=20= ~NSWindowCollectionBehaviorFullScreenPrimary;=0A+=20=20=20=20=20=20}=0A=20= =0A=20=20=20=20=20=20=20[win=20setCollectionBehavior:=20b];=0A=20#if=20= MAC_OS_X_VERSION_MIN_REQUIRED=20<=201070=0A@@=20-7863,9=20+7929,14=20@@=20= -=20(void)toggleFullScreen:=20(id)sender=0A=20=20=20=20=20{=0A=20#if=20= defined=20(NS_IMPL_COCOA)=20&&=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20= 1070=0A=20#if=20MAC_OS_X_VERSION_MIN_REQUIRED=20<=201070=0A-=20=20=20=20=20= =20if=20([[self=20window]=20respondsToSelector:=20= @selector(toggleFullScreen:)])=0A+=20=20=20=20=20=20if=20([[self=20= window]=20respondsToSelector:=20@selector(toggleFullScreen:)]){=0A=20= #endif=0A=20=20=20=20=20=20=20=20=20[[self=20window]=20= toggleFullScreen:sender];=0A+=20=20=20=20=20=20=20=20//=20wait=20for=20= fullscreen=20animation=20complete=20(bug#28496)=0A+=20=20=20=20=20=20=20=20= [self=20waitFullScreenTransition];=0A+#endif=0A+#if=20= MAC_OS_X_VERSION_MIN_REQUIRED=20<=201070=0A+=20=20=20=20=20=20}=0A=20= #endif=0A=20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A= --Apple-Mail=_A3D226A6-99FF-4758-A3D3-1E8EC325CD41--