/[emacs]/emacs/src/macfns.c
ViewVC logotype

Diff of /emacs/src/macfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24.4.4 by miles, Sat Sep 4 09:14:27 2004 UTC revision 1.24.4.5 by miles, Thu Oct 14 08:49:55 2004 UTC
# Line 312  static Lisp_Object x_default_scroll_bar_ Line 312  static Lisp_Object x_default_scroll_bar_
312                                                               Lisp_Object,                                                               Lisp_Object,
313                                                               char *, char *,                                                               char *, char *,
314                                                               int));                                                               int));
315    
316    extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *));
317    
318  /* Store the screen positions of frame F into XPTR and YPTR.  /* Store the screen positions of frame F into XPTR and YPTR.
319     These are the positions of the containing window manager window,     These are the positions of the containing window manager window,
320     not Emacs's own window.  */     not Emacs's own window.  */
# Line 321  x_real_positions (f, xptr, yptr) Line 324  x_real_positions (f, xptr, yptr)
324       FRAME_PTR f;       FRAME_PTR f;
325       int *xptr, *yptr;       int *xptr, *yptr;
326  {  {
327    Point pt;    Rect inner, outer;
   GrafPtr oldport;  
328    
329    GetPort (&oldport);    mac_get_window_bounds (f, &inner, &outer);
   SetPortWindowPort (FRAME_MAC_WINDOW (f));  
330    
331  #if TARGET_API_MAC_CARBON    f->x_pixels_diff = inner.left - outer.left;
332    {    f->y_pixels_diff = inner.top - outer.top;
     Rect r;  
333    
334      GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r);    *xptr = outer.left;
335      SetPt (&pt, r.left, r.top);    *yptr = outer.top;
   }  
 #else /* not TARGET_API_MAC_CARBON */  
   SetPt (&pt,  
          FRAME_MAC_WINDOW (f)->portRect.left,  
          FRAME_MAC_WINDOW (f)->portRect.top);  
 #endif /* not TARGET_API_MAC_CARBON */  
   LocalToGlobal (&pt);  
   SetPort (oldport);  
   
   /* MAC has no frame pixel diff.  */  
   f->x_pixels_diff = 0;  
   f->y_pixels_diff = 0;  
   
   *xptr = pt.h;  
   *yptr = pt.v;  
336  }  }
337    
338    
# Line 4262  specified.  Ensure that file exists if M Line 4247  specified.  Ensure that file exists if M
4247      NavUserAction userAction;      NavUserAction userAction;
4248      CFStringRef message=NULL, client=NULL, saveName = NULL;      CFStringRef message=NULL, client=NULL, saveName = NULL;
4249            
4250        BLOCK_INPUT;
4251      /* No need for a callback function because we are modal */      /* No need for a callback function because we are modal */
4252      NavGetDefaultDialogCreationOptions(&options);      NavGetDefaultDialogCreationOptions(&options);
4253      options.modality = kWindowModalityAppModal;      options.modality = kWindowModalityAppModal;
# Line 4332  specified.  Ensure that file exists if M Line 4318  specified.  Ensure that file exists if M
4318          AEDisposeDesc(&defLocAed);          AEDisposeDesc(&defLocAed);
4319        }        }
4320    
       BLOCK_INPUT;  
4321        status = NavDialogRun(dialogRef);        status = NavDialogRun(dialogRef);
       UNBLOCK_INPUT;  
4322      }      }
4323    
4324      if (saveName) CFRelease(saveName);      if (saveName) CFRelease(saveName);
# Line 4347  specified.  Ensure that file exists if M Line 4331  specified.  Ensure that file exists if M
4331          {          {
4332          case kNavUserActionNone:          case kNavUserActionNone:
4333          case kNavUserActionCancel:          case kNavUserActionCancel:
4334            NavDialogDispose(dialogRef);            break;                /* Treat cancel like C-g */
           Fsignal (Qquit, Qnil);  /* Treat cancel like C-g */  
           return;  
4335          case kNavUserActionOpen:          case kNavUserActionOpen:
4336          case kNavUserActionChoose:          case kNavUserActionChoose:
4337          case kNavUserActionSaveAs:          case kNavUserActionSaveAs:
# Line 4384  specified.  Ensure that file exists if M Line 4366  specified.  Ensure that file exists if M
4366                                 dir, mustmatch, dir, Qfile_name_history,                                 dir, mustmatch, dir, Qfile_name_history,
4367                                 default_filename, Qnil);                                 default_filename, Qnil);
4368      }      }
4369        UNBLOCK_INPUT;
4370    }    }
4371    
4372    UNGCPRO;    UNGCPRO;

Legend:
Removed from v.1.24.4.4  
changed lines
  Added in v.1.24.4.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26