comparison src/nsterm.m @ 112433:7b649f6eac4f

Merge from mainline.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 22 Jan 2011 17:09:09 -0800
parents 4b27e6d58d2c
children bcecab2ad22d
comparison
equal deleted inserted replaced
112412:647e164c1f3e 112433:7b649f6eac4f
5061 struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe); 5061 struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
5062 struct frame *old_focus = dpyinfo->x_focus_frame; 5062 struct frame *old_focus = dpyinfo->x_focus_frame;
5063 5063
5064 NSTRACE (windowDidBecomeKey); 5064 NSTRACE (windowDidBecomeKey);
5065 5065
5066 emacsframe->output_data.ns->dont_constrain = 1;
5067 if (emacsframe != old_focus) 5066 if (emacsframe != old_focus)
5068 dpyinfo->x_focus_frame = emacsframe; 5067 dpyinfo->x_focus_frame = emacsframe;
5069 5068
5070 ns_frame_rehighlight (emacsframe); 5069 ns_frame_rehighlight (emacsframe);
5071 5070
5676 constrain. Other times not. */ 5675 constrain. Other times not. */
5677 struct frame *f = ((EmacsView *)[self delegate])->emacsframe; 5676 struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
5678 if (f->output_data.ns->dont_constrain) 5677 if (f->output_data.ns->dont_constrain)
5679 return frameRect; 5678 return frameRect;
5680 5679
5680 f->output_data.ns->dont_constrain = 1;
5681 return [super constrainFrameRect:frameRect toScreen:screen]; 5681 return [super constrainFrameRect:frameRect toScreen:screen];
5682 } 5682 }
5683 5683
5684 5684
5685 /* called only on resize clicks by special case in EmacsApp-sendEvent */ 5685 /* called only on resize clicks by special case in EmacsApp-sendEvent */
5686 - (void)mouseDown: (NSEvent *)theEvent 5686 - (void)mouseDown: (NSEvent *)theEvent
5687 { 5687 {
5688 struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
5689 f->output_data.ns->dont_constrain = 1;
5690 if (ns_in_resize) 5688 if (ns_in_resize)
5691 { 5689 {
5692 NSSize size = [[theEvent window] frame].size; 5690 NSSize size = [[theEvent window] frame].size;
5693 grabOffset = [theEvent locationInWindow]; 5691 grabOffset = [theEvent locationInWindow];
5694 grabOffset.x = size.width - grabOffset.x; 5692 grabOffset.x = size.width - grabOffset.x;