From: Anders Lindgren <andlind@gmail.com>
To: David Reitter <david.reitter@gmail.com>
Cc: 21862@debbugs.gnu.org, 21862-done@debbugs.gnu.org,
David Caldwell <david@porkrind.org>
Subject: bug#21862: Acknowledgement (24.5; Commit 35cd5181450 breaks nsterm.m on Mac OS X 10.6)
Date: Sat, 14 Nov 2015 21:14:45 +0100 [thread overview]
Message-ID: <CABr8ebbt2418HqyhCtTTX=v8L-H4YbDt8YAH+G79FJFYZTze6g@mail.gmail.com> (raw)
In-Reply-To: <CABr8ebbVCsouLyUFi-mZN88ADQ3cd8Pi=jU-nA_vTuGtPoxX2g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]
Hi,
here is another, cleaner, patch to the OS X 10.6.8 build problem. It adds a
non-notification version of windowDidBecomeKey, which
windowDidEnterFullScreen now calls. This mean that 1) all functions now use
the same pattern (the notification version calls the non-notification
version) and 2) there is no need for the locally defined symbol
NSWindowDidEnterFullScreenNotification any more.
David (R), if you think this is a good way to solve this, would you like to
commit this patch, or would you prefer me to do it?
-- Anders
On Wed, Nov 11, 2015 at 7:56 AM, Anders Lindgren <andlind@gmail.com> wrote:
> I don’t think you should unconditionally declare this one:
>>
>> +- (void)windowDidEnterFullScreen:(NSNotification *)notification;
>>
>
>> Only declare it for the 10.6 build, please.
>>
>
> Ah, yes, that seems correct. It is provided from 10.7 onwards.
>
> Alternatively, we can implement a non-notification variant of
> windowDidBecomeKey (it doesn't use the notification anyway), that way we
> can move the code from windowDidEnterFullScreen from the notification
> variant to the non-notification variant, and avoid a lot of the
> notification complexity.
>
> -- Anders
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 2055 bytes --]
[-- Attachment #2: osx106-2.diff --]
[-- Type: text/plain, Size: 2074 bytes --]
diff --git a/src/nsterm.h b/src/nsterm.h
index 1b330f0..73b3d89 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -412,6 +412,11 @@ void nstrace_leave(int *);
- (void)windowDidMove: (id)sender;
#endif
- (int)fullscreenState;
+- (void)windowWillEnterFullScreen;
+- (void)windowDidEnterFullScreen;
+- (void)windowWillExitFullScreen;
+- (void)windowDidExitFullScreen;
+- (void)windowDidBecomeKey;
@end
diff --git a/src/nsterm.m b/src/nsterm.m
index 5c39d5c..397ade1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6440,6 +6440,12 @@ not_in_argv (NSString *arg)
- (void)windowDidBecomeKey: (NSNotification *)notification
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
{
+ [self windowDidBecomeKey];
+}
+
+
+- (void)windowDidBecomeKey /* for direct calls */
+{
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
struct frame *old_focus = dpyinfo->x_focus_frame;
@@ -6866,10 +6872,6 @@ not_in_argv (NSString *arg)
}
#endif
-#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-#define NSWindowDidEnterFullScreenNotification "NSWindowDidEnterFullScreenNotification"
-#endif
-
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
[self windowWillEnterFullScreen];
@@ -6880,19 +6882,18 @@ not_in_argv (NSString *arg)
fs_before_fs = fs_state;
}
-- (void)windowDidEnterFullScreen /* provided for direct calls */
+- (void)windowDidEnterFullScreen:(NSNotification *)notification
{
- [self windowDidEnterFullScreen:
- [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification
- object:[self window]]];
+ [self windowDidEnterFullScreen];
}
-- (void)windowDidEnterFullScreen:(NSNotification *)notification
+
+- (void)windowDidEnterFullScreen /* provided for direct calls */
{
NSTRACE ("windowDidEnterFullScreen");
[self setFSValue: FULLSCREEN_BOTH];
if (! [self fsIsNative])
{
- [self windowDidBecomeKey:notification];
+ [self windowDidBecomeKey];
[nonfs_window orderOut:self];
}
else
next prev parent reply other threads:[~2015-11-14 20:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 13:16 bug#21862: 24.5; Commit 35cd5181450 breaks nsterm.m on Mac OS X 10.6 David Caldwell
[not found] ` <handler.21862.B.14469886195908.ack@debbugs.gnu.org>
2015-11-10 19:37 ` bug#21862: Acknowledgement (24.5; Commit 35cd5181450 breaks nsterm.m on Mac OS X 10.6) David Caldwell
2015-11-10 19:43 ` David Reitter
2015-11-10 21:02 ` David Reitter
2015-11-10 21:11 ` David Caldwell
2015-11-10 21:39 ` Anders Lindgren
2015-11-10 22:10 ` David Reitter
2015-11-11 6:56 ` Anders Lindgren
2015-11-14 20:14 ` Anders Lindgren [this message]
2015-11-14 20:23 ` David Reitter
2015-11-14 23:23 ` John Wiegley
2015-11-15 7:18 ` Anders Lindgren
2015-11-15 17:57 ` Anders Lindgren
2015-11-10 22:12 ` David Caldwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABr8ebbt2418HqyhCtTTX=v8L-H4YbDt8YAH+G79FJFYZTze6g@mail.gmail.com' \
--to=andlind@gmail.com \
--cc=21862-done@debbugs.gnu.org \
--cc=21862@debbugs.gnu.org \
--cc=david.reitter@gmail.com \
--cc=david@porkrind.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.