aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsterm.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 9ca74e8baf9..4a9a1928359 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -896,7 +896,11 @@ ns_raise_frame (struct frame *f)
896 NSView *view = FRAME_NS_VIEW (f); 896 NSView *view = FRAME_NS_VIEW (f);
897 check_ns (); 897 check_ns ();
898 BLOCK_INPUT; 898 BLOCK_INPUT;
899 [[view window] makeKeyAndOrderFront: NSApp]; 899 FRAME_SAMPLE_VISIBILITY (f);
900 if (FRAME_VISIBLE_P (f))
901 {
902 [[view window] makeKeyAndOrderFront: NSApp];
903 }
900 UNBLOCK_INPUT; 904 UNBLOCK_INPUT;
901} 905}
902 906
@@ -983,7 +987,10 @@ x_make_frame_visible (struct frame *f)
983 called this (frame.c:Fraise_frame ()) also called raise_lower; 987 called this (frame.c:Fraise_frame ()) also called raise_lower;
984 if this ends up the case again, comment this out again. */ 988 if this ends up the case again, comment this out again. */
985 if (!FRAME_VISIBLE_P (f)) 989 if (!FRAME_VISIBLE_P (f))
986 ns_raise_frame (f); 990 {
991 f->async_visible = 1;
992 ns_raise_frame (f);
993 }
987} 994}
988 995
989 996
@@ -4461,7 +4468,8 @@ extern void update_window_cursor (struct window *w, int on);
4461 if (!emacs_event) 4468 if (!emacs_event)
4462 return; 4469 return;
4463 4470
4464 if (![[self window] isKeyWindow]) 4471 if (![[self window] isKeyWindow]
4472 && [[theEvent window] isKindOfClass: [EmacsWindow class]])
4465 { 4473 {
4466 /* XXX: There is an occasional condition in which, when Emacs display 4474 /* XXX: There is an occasional condition in which, when Emacs display
4467 updates a different frame from the current one, and temporarily 4475 updates a different frame from the current one, and temporarily
@@ -4469,8 +4477,7 @@ extern void update_window_cursor (struct window *w, int on);
4469 (dispnew.c:3878), OS will send the event to the correct NSWindow, but 4477 (dispnew.c:3878), OS will send the event to the correct NSWindow, but
4470 for some reason that window has its first responder set to the NSView 4478 for some reason that window has its first responder set to the NSView
4471 most recently updated (I guess), which is not the correct one. */ 4479 most recently updated (I guess), which is not the correct one. */
4472 if ([[theEvent window] isKindOfClass: [EmacsWindow class]]) 4480 [(EmacsView *)[[theEvent window] delegate] keyDown: theEvent];
4473 [(EmacsView *)[[theEvent window] delegate] keyDown: theEvent];
4474 return; 4481 return;
4475 } 4482 }
4476 4483
@@ -5466,8 +5473,15 @@ extern void update_window_cursor (struct window *w, int on);
5466 5473
5467 ns_clear_frame_area (emacsframe, x, y, width, height); 5474 ns_clear_frame_area (emacsframe, x, y, width, height);
5468 expose_frame (emacsframe, x, y, width, height); 5475 expose_frame (emacsframe, x, y, width, height);
5469 emacsframe->async_visible = 1; 5476
5470 emacsframe->async_iconified = 0; 5477 /*
5478 drawRect: may be called (at least in OS X 10.5) for invisible
5479 views as well for some reason. Thus, do not infer visibility
5480 here.
5481
5482 emacsframe->async_visible = 1;
5483 emacsframe->async_iconified = 0;
5484 */
5471} 5485}
5472 5486
5473 5487