summaryrefslogtreecommitdiff
path: root/src/macterm.c
diff options
context:
space:
mode:
authorSteven Tamm <steventamm@mac.com>2004-06-28 16:20:41 +0000
committerSteven Tamm <steventamm@mac.com>2004-06-28 16:20:41 +0000
commite439b9255d56a820723e10fdf9131da9afee34bb (patch)
tree2c4a8c48da24476a24d8f1992d35079e0aa0f806 /src/macterm.c
parentdfab762fc9e10457223a61696d367a857fee9fd5 (diff)
downloademacs-e439b9255d56a820723e10fdf9131da9afee34bb.tar.gz
emacs-e439b9255d56a820723e10fdf9131da9afee34bb.tar.bz2
emacs-e439b9255d56a820723e10fdf9131da9afee34bb.zip
macterm.c (XTread_socket): Correctly set the frame position
after the window is moved.
Diffstat (limited to 'src/macterm.c')
-rw-r--r--src/macterm.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/macterm.c b/src/macterm.c
index 55ae1b35d83..bef37addaa6 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -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: