]> git.eshelyaron.com Git - emacs.git/commitdiff
macterm.c (XTread_socket): Correctly set the frame position
authorSteven Tamm <steventamm@mac.com>
Mon, 28 Jun 2004 16:20:41 +0000 (16:20 +0000)
committerSteven Tamm <steventamm@mac.com>
Mon, 28 Jun 2004 16:20:41 +0000 (16:20 +0000)
after the window is moved.

src/ChangeLog
src/macterm.c

index 1cdabd1fb1e03085f00b71ec4ae090fc1510c5d9..144e4890e8e882028c4929fa6eabaceb840510cf 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-28  Steven Tamm  <tamm@Steven-Tamms-Computer.local>
+
+       * macterm.c (XTread_socket): Correctly set the frame position
+       after the window is moved.
+
 2004-06-28  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * gtkutil.c (xg_get_image_for_pixmap): Call g_object_unref on
index 55ae1b35d83449a8d9ea4b565ae6b509ab5c4324..bef37addaa69d29bc421a72693c8232b64a6db39 100644 (file)
@@ -8084,6 +8084,25 @@ XTread_socket (sd, expected, hold_quit)
       if (!mac_convert_event_ref (eventRef, &er))
        switch (GetEventClass (eventRef))
          {
+         case kEventClassWindow:
+           if (GetEventKind (eventRef) == kEventWindowBoundsChanged) 
+             {
+               WindowPtr window_ptr;
+               GetEventParameter(eventRef, kEventParamDirectObject,
+                                 typeWindowRef, NULL, sizeof(WindowPtr),
+                                 NULL, &window_ptr);
+               f = mac_window_to_frame (window_ptr);
+               if (f && !f->async_iconified)
+                 {
+                   int x, y;
+                   
+                   x_real_positions (f, &x, &y);
+                   f->left_pos = x;
+                   f->top_pos = y;
+                 }
+               SendEventToEventTarget (eventRef, toolbox_dispatcher);
+             }
+           break;
          case kEventClassMouse:
            if (GetEventKind (eventRef) == kEventMouseWheelMoved)
              {
@@ -8306,6 +8325,18 @@ XTread_socket (sd, expected, hold_quit)
 #else /* not TARGET_API_MAC_CARBON */
                DragWindow (window_ptr, er.where, &qd.screenBits.bounds);
 #endif /* not TARGET_API_MAC_CARBON */
+               /* Update the frame parameters.  */
+               {
+                 struct frame *f = mac_window_to_frame (window_ptr);
+                 if (f && !f->async_iconified)
+                   {
+                     int x, y;
+                     
+                     x_real_positions (f, &x, &y);
+                     f->left_pos = x;
+                     f->top_pos = y;
+                   }
+               }
                break;
 
              case inGoAway: