Mercurial > emacs
changeset 3030:2c5ea1c98256
(XTread_socket): For ConfigureNotify event,
translate coordinates if send_event field is false
provided the x-coord value is not large.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 24 May 1993 19:54:15 +0000 |
parents | 2bf7bd92bd43 |
children | 5c96dfc52433 |
files | src/xterm.c |
diffstat | 1 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon May 24 18:46:13 1993 +0000 +++ b/src/xterm.c Mon May 24 19:54:15 1993 +0000 @@ -3090,6 +3090,33 @@ SET_FRAME_GARBAGED (f); } + if (! event.xconfigure.send_event + /* Sometimes we get root-relative coordinates + even tho send_event is 0. + This is not a perfectly reliable way of distinguishing, + but it does the right thing except in a case + where it doesn't hurt much to be wrong. */ + && event.xconfigure.x < 20) + { + Window win, child; + int win_x, win_y; + + XTranslateCoordinates (x_current_display, + + /* From-window, to-window. */ + event.xconfigure.window, ROOT_WINDOW, + + /* From-position, to-position. */ + event.xconfigure.x, + event.xconfigure.y, + &win_x, &win_y, + + /* Child of win. */ + &child); + event.xconfigure.x = win_x; + event.xconfigure.y = win_y; + } + f->display.x->pixel_width = event.xconfigure.width; f->display.x->pixel_height = event.xconfigure.height; f->display.x->left_pos = event.xconfigure.x;