Mercurial > emacs
changeset 6088:8e38fcb2df96
(XTread_socket): For case ConfigureNotify, call x_any_window_to_frame.
[USE_X_TOOLKIT]: Call XTranslateCoordinates for case ConfigureNotify
when send_event is 0 and when the event is relative to toplevel widget.
author | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> |
---|---|
date | Fri, 25 Feb 1994 09:29:20 +0000 |
parents | 00fbbb620f36 |
children | e7ac377e8b4d |
files | src/xterm.c |
diffstat | 1 files changed, 35 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Fri Feb 25 09:10:22 1994 +0000 +++ b/src/xterm.c Fri Feb 25 09:29:20 1994 +0000 @@ -3480,11 +3480,43 @@ break; case ConfigureNotify: + f = x_any_window_to_frame (event.xconfigure.window); #ifdef USE_X_TOOLKIT - /* process done in widget.c */ - goto OTHER; + if (f + && ! event.xconfigure.send_event + && (event.xconfigure.window == XtWindow (f->display.x->widget))) + { + Window win, child; + int win_x, win_y; + + /* Find the position of the outside upper-left corner of + the window, in the root coordinate system. Don't + refer to the parent window here; we may be processing + this event after the window manager has changed our + parent, but before we have reached the ReparentNotify. */ + XTranslateCoordinates (x_current_display, + + /* From-window, to-window. */ + XtWindow (f->display.x->widget), + ROOT_WINDOW, + + /* From-position, to-position. */ + -event.xconfigure.border_width, + -event.xconfigure.border_width, + &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; + f->display.x->top_pos = event.xconfigure.y; + } + goto OTHER; #else /* not USE_X_TOOLKIT */ - f = x_window_to_frame (event.xconfigure.window); if (f) { int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height);