aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2002-10-03 17:53:23 +0000
committerJan Djärv2002-10-03 17:53:23 +0000
commit0331883833db885c1de2708379bb7b351d213680 (patch)
tree07eec47d9f055ad02cab51df115031a68f7a95cd
parent4c2f559e1616ec431bc2be357adbe6bc70db2edb (diff)
downloademacs-0331883833db885c1de2708379bb7b351d213680.tar.gz
emacs-0331883833db885c1de2708379bb7b351d213680.zip
* xterm.c (XTread_socket): For ConfigureNotify, with x and y == 0,
and USE_MOTIF, call XTranslateCoordinates to get the real x and y. This is to also handle x/y changes that occur because of a resize.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xterm.c20
2 files changed, 24 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e7055f1af2a..4608db9e3b6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12002-10-03 Jan D. <jan.h.d@swipnet.se>
2
3 * xterm.c (XTread_socket): For ConfigureNotify, with x and y == 0,
4 and USE_MOTIF, call XTranslateCoordinates to get the real x and y.
5 This is to also handle x/y changes that occur because of a resize.
6
12002-10-02 John Paul Wallington <jpw@shootybangbang.com> 72002-10-02 John Paul Wallington <jpw@shootybangbang.com>
2 8
3 * frame.c (Vdelete_frame_functions): New variable. 9 * frame.c (Vdelete_frame_functions): New variable.
diff --git a/src/xterm.c b/src/xterm.c
index 731f94e7e44..e457d6e4519 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11179,8 +11179,24 @@ XTread_socket (sd, bufp, numchars, expected)
11179 in the emacs widget, which messes up Motif menus. */ 11179 in the emacs widget, which messes up Motif menus. */
11180 if (event.xconfigure.x == 0 && event.xconfigure.y == 0) 11180 if (event.xconfigure.x == 0 && event.xconfigure.y == 0)
11181 { 11181 {
11182 event.xconfigure.x = f->output_data.x->widget->core.x; 11182 Window child;
11183 event.xconfigure.y = f->output_data.x->widget->core.y; 11183 int count;
11184
11185 /* We can get a ConfigureNotify because of a resize,
11186 so we can't just take x and y from the widget.
11187 Since this event may come on something else than
11188 the top level window, we can't use x_real_position
11189 either. So we get the root window x/y for 0/0 in
11190 the window in the event. */
11191 count = x_catch_errors (FRAME_X_DISPLAY (f));
11192 XTranslateCoordinates (FRAME_X_DISPLAY (f),
11193 event.xconfigure.window,
11194 FRAME_X_DISPLAY_INFO (f)->root_window,
11195 0, 0,
11196 &event.xconfigure.x,
11197 &event.xconfigure.y,
11198 &child);
11199 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
11184 } 11200 }
11185#endif /* USE_MOTIF */ 11201#endif /* USE_MOTIF */
11186 } 11202 }