# HG changeset patch # User Richard M. Stallman # Date 738291621 0 # Node ID 0267fb20b0df533a9f9c446de787e917da237cdb # Parent 81c1ecaafd88ec3c15810086bb1965ba81f2e148 (XTread_socket, ConfigureNotify case): Convert from parent window, not Emacs window. (XTread_socket): Handle ReparentNotify events. (XTread_socket): For ConfigureNotify event, translate coordinates if send_event field is false provided the x-coord value is not large. diff -r 81c1ecaafd88 -r 0267fb20b0df src/xterm.c --- a/src/xterm.c Tue May 25 00:43:37 1993 +0000 +++ b/src/xterm.c Tue May 25 01:00:21 1993 +0000 @@ -2697,6 +2697,12 @@ #endif break; + case ReparentNotify: + f = x_window_to_frame (event.xreparent.window); + if (f) + f->display.x->parent_desc = event.xreparent.parent; + break; + case Expose: f = x_window_to_frame (event.xexpose.window); if (f) @@ -3090,21 +3096,18 @@ 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) + if (! event.xconfigure.send_event) { Window win, child; int win_x, win_y; + /* Coords are relative to the parent. + Convert them to root-relative. */ XTranslateCoordinates (x_current_display, /* From-window, to-window. */ - event.xconfigure.window, ROOT_WINDOW, + f->display.x->parent_desc, + ROOT_WINDOW, /* From-position, to-position. */ event.xconfigure.x,