diff options
| author | Steven Tamm | 2004-06-28 16:20:41 +0000 |
|---|---|---|
| committer | Steven Tamm | 2004-06-28 16:20:41 +0000 |
| commit | e439b9255d56a820723e10fdf9131da9afee34bb (patch) | |
| tree | 2c4a8c48da24476a24d8f1992d35079e0aa0f806 /src | |
| parent | dfab762fc9e10457223a61696d367a857fee9fd5 (diff) | |
| download | emacs-e439b9255d56a820723e10fdf9131da9afee34bb.tar.gz emacs-e439b9255d56a820723e10fdf9131da9afee34bb.zip | |
macterm.c (XTread_socket): Correctly set the frame position
after the window is moved.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/macterm.c | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1cdabd1fb1e..144e4890e8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-06-28 Steven Tamm <tamm@Steven-Tamms-Computer.local> | ||
| 2 | |||
| 3 | * macterm.c (XTread_socket): Correctly set the frame position | ||
| 4 | after the window is moved. | ||
| 5 | |||
| 1 | 2004-06-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2004-06-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * gtkutil.c (xg_get_image_for_pixmap): Call g_object_unref on | 8 | * gtkutil.c (xg_get_image_for_pixmap): Call g_object_unref on |
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) | |||
| 8084 | if (!mac_convert_event_ref (eventRef, &er)) | 8084 | if (!mac_convert_event_ref (eventRef, &er)) |
| 8085 | switch (GetEventClass (eventRef)) | 8085 | switch (GetEventClass (eventRef)) |
| 8086 | { | 8086 | { |
| 8087 | case kEventClassWindow: | ||
| 8088 | if (GetEventKind (eventRef) == kEventWindowBoundsChanged) | ||
| 8089 | { | ||
| 8090 | WindowPtr window_ptr; | ||
| 8091 | GetEventParameter(eventRef, kEventParamDirectObject, | ||
| 8092 | typeWindowRef, NULL, sizeof(WindowPtr), | ||
| 8093 | NULL, &window_ptr); | ||
| 8094 | f = mac_window_to_frame (window_ptr); | ||
| 8095 | if (f && !f->async_iconified) | ||
| 8096 | { | ||
| 8097 | int x, y; | ||
| 8098 | |||
| 8099 | x_real_positions (f, &x, &y); | ||
| 8100 | f->left_pos = x; | ||
| 8101 | f->top_pos = y; | ||
| 8102 | } | ||
| 8103 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | ||
| 8104 | } | ||
| 8105 | break; | ||
| 8087 | case kEventClassMouse: | 8106 | case kEventClassMouse: |
| 8088 | if (GetEventKind (eventRef) == kEventMouseWheelMoved) | 8107 | if (GetEventKind (eventRef) == kEventMouseWheelMoved) |
| 8089 | { | 8108 | { |
| @@ -8306,6 +8325,18 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8306 | #else /* not TARGET_API_MAC_CARBON */ | 8325 | #else /* not TARGET_API_MAC_CARBON */ |
| 8307 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); | 8326 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); |
| 8308 | #endif /* not TARGET_API_MAC_CARBON */ | 8327 | #endif /* not TARGET_API_MAC_CARBON */ |
| 8328 | /* Update the frame parameters. */ | ||
| 8329 | { | ||
| 8330 | struct frame *f = mac_window_to_frame (window_ptr); | ||
| 8331 | if (f && !f->async_iconified) | ||
| 8332 | { | ||
| 8333 | int x, y; | ||
| 8334 | |||
| 8335 | x_real_positions (f, &x, &y); | ||
| 8336 | f->left_pos = x; | ||
| 8337 | f->top_pos = y; | ||
| 8338 | } | ||
| 8339 | } | ||
| 8309 | break; | 8340 | break; |
| 8310 | 8341 | ||
| 8311 | case inGoAway: | 8342 | case inGoAway: |