1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00

(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.
This commit is contained in:
Fred Pierresteguy 1994-02-25 09:29:20 +00:00
parent 982a94d930
commit 13ce2d73e4

View File

@ -3480,11 +3480,43 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
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);