# HG changeset patch # User Richard M. Stallman # Date 738273255 0 # Node ID 2c5ea1c9825656ef2b746da83a027b20cf76c883 # Parent 2bf7bd92bd431530d42f50734230b00640304346 (XTread_socket): For ConfigureNotify event, translate coordinates if send_event field is false provided the x-coord value is not large. diff -r 2bf7bd92bd43 -r 2c5ea1c98256 src/xterm.c --- 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;