comparison src/nsterm.h @ 112396:e79e716435f4

Make Nextstep port handle multiple screens for resize and move. * nsterm.h (ns_output): Add dont_constrain and zooming. (EmacsView): Add ns_userRect. * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check if ns_alternate_modifier is none. * nsterm.m (x_set_offset, windowDidMove): When calculating y, use first screen, not the window screen. (x_set_window_size): Remove constraints. Calculate origin.y only if zooming is 0 and without referring to a screen. (windowWillResize): Don't modify frameSize. (windowDidBecomeKey, mouseDown): Set dont_constrain to 1. (initFrameFromEmacs): Initialize ns_userRect. (windowShouldZoom): Set zooming to one. Remove all other code. (windowWillUseStandardFrame): Move static ns_userRect to EmacsView. Zero it after restore. (constrainFrameRect): New method for EmacsWindow. (mouseDragged): Always post NSWindowDidResizeNotification after call to windowWillResize.
author Jan D. <jan.h.d@swipnet.se>
date Fri, 21 Jan 2011 15:19:44 +0100
parents ef719132ddfa
children
comparison
equal deleted inserted replaced
112395:f1de024f822c 112396:e79e716435f4
64 @public 64 @public
65 struct frame *emacsframe; 65 struct frame *emacsframe;
66 int rows, cols; 66 int rows, cols;
67 int scrollbarsNeedingUpdate; 67 int scrollbarsNeedingUpdate;
68 EmacsToolbar *toolbar; 68 EmacsToolbar *toolbar;
69 NSRect ns_userRect;
69 } 70 }
70 71
71 /* AppKit-side interface */ 72 /* AppKit-side interface */
72 - menuDown: sender; 73 - menuDown: sender;
73 - toolbarClicked: (id)item; 74 - toolbarClicked: (id)item;
563 /* The height of the toolbar if displayed, else 0. */ 564 /* The height of the toolbar if displayed, else 0. */
564 int toolbar_height; 565 int toolbar_height;
565 566
566 /* This is the Emacs structure for the NS display this frame is on. */ 567 /* This is the Emacs structure for the NS display this frame is on. */
567 struct ns_display_info *display_info; 568 struct ns_display_info *display_info;
569
570 /* Non-zero if we want to constrain the frame to the screen. */
571 int dont_constrain;
572
573 /* Non-zero if we are zooming (maximizing) the frame. */
574 int zooming;
568 }; 575 };
569 576
570 /* this dummy decl needed to support TTYs */ 577 /* this dummy decl needed to support TTYs */
571 struct x_output 578 struct x_output
572 { 579 {