aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-24 19:54:15 +0000
committerRichard M. Stallman1993-05-24 19:54:15 +0000
commitaf395ec10ec6fa01978817062bac69a45c51ba41 (patch)
treeb6ed88a0fda779fa650abbe4d7d086012369a00d /src
parentc3e46f0c63ec0a2278d7f22ec8ace85dc442407c (diff)
downloademacs-af395ec10ec6fa01978817062bac69a45c51ba41.tar.gz
emacs-af395ec10ec6fa01978817062bac69a45c51ba41.zip
(XTread_socket): For ConfigureNotify event,
translate coordinates if send_event field is false provided the x-coord value is not large.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 9d85e1c9d28..8970185967c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3090,6 +3090,33 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
3090 SET_FRAME_GARBAGED (f); 3090 SET_FRAME_GARBAGED (f);
3091 } 3091 }
3092 3092
3093 if (! event.xconfigure.send_event
3094 /* Sometimes we get root-relative coordinates
3095 even tho send_event is 0.
3096 This is not a perfectly reliable way of distinguishing,
3097 but it does the right thing except in a case
3098 where it doesn't hurt much to be wrong. */
3099 && event.xconfigure.x < 20)
3100 {
3101 Window win, child;
3102 int win_x, win_y;
3103
3104 XTranslateCoordinates (x_current_display,
3105
3106 /* From-window, to-window. */
3107 event.xconfigure.window, ROOT_WINDOW,
3108
3109 /* From-position, to-position. */
3110 event.xconfigure.x,
3111 event.xconfigure.y,
3112 &win_x, &win_y,
3113
3114 /* Child of win. */
3115 &child);
3116 event.xconfigure.x = win_x;
3117 event.xconfigure.y = win_y;
3118 }
3119
3093 f->display.x->pixel_width = event.xconfigure.width; 3120 f->display.x->pixel_width = event.xconfigure.width;
3094 f->display.x->pixel_height = event.xconfigure.height; 3121 f->display.x->pixel_height = event.xconfigure.height;
3095 f->display.x->left_pos = event.xconfigure.x; 3122 f->display.x->left_pos = event.xconfigure.x;