emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macterm.c,v


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/macterm.c,v
Date: Thu, 12 Apr 2007 08:11:28 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   07/04/12 08:11:27

Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -b -r1.212 -r1.213
--- macterm.c   26 Mar 2007 08:13:27 -0000      1.212
+++ macterm.c   12 Apr 2007 08:11:27 -0000      1.213
@@ -10533,8 +10533,7 @@
     {
       Point mouse_pos;
 
-      GetMouse (&mouse_pos);
-      LocalToGlobal (&mouse_pos);
+      GetGlobalMouse (&mouse_pos);
       err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
                               sizeof (Point), &mouse_pos);
     }
@@ -11554,7 +11553,7 @@
       }
     if (err == noErr)
       {
-       CGRect bounds = CGRectMake (0, 0, 0, 0);
+       CGRect bounds = CGRectZero;
 
        while (ndisps-- > 0)
          bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
@@ -11569,15 +11568,21 @@
   }
 #else
   {
-    GDHandle main_device_handle = LMGetMainDevice();
+    GDHandle gdh = GetMainDevice ();
+    Rect rect = (**gdh).gdRect;
 
-    dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);
+    dpyinfo->color_p = TestDeviceAttribute (gdh, gdDevType);
     for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 
1)
-      if (HasDepth (main_device_handle, dpyinfo->n_planes,
-                   gdDevType, dpyinfo->color_p))
+      if (HasDepth (gdh, dpyinfo->n_planes, gdDevType, dpyinfo->color_p))
        break;
-    dpyinfo->height = (**main_device_handle).gdRect.bottom;
-    dpyinfo->width = (**main_device_handle).gdRect.right;
+
+    for (gdh = GetDeviceList (); gdh; gdh = GetNextDevice (gdh))
+      if (TestDeviceAttribute (gdh, screenDevice)
+         && TestDeviceAttribute (gdh, screenActive))
+       UnionRect (&rect, &(**gdh).gdRect, &rect);
+
+    dpyinfo->height = rect.bottom - rect.top;
+    dpyinfo->width = rect.right - rect.left;
   }
 #endif
   dpyinfo->grabbed = 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]