aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFred Pierresteguy1994-02-25 09:29:20 +0000
committerFred Pierresteguy1994-02-25 09:29:20 +0000
commit13ce2d73e47d1c9c10075e7b0b3f9b3fbbae98d5 (patch)
tree632482f7beec19f110155be18b1f6a1e4a494b00 /src
parent982a94d9302f893b528d2c653061a13e04e598df (diff)
downloademacs-13ce2d73e47d1c9c10075e7b0b3f9b3fbbae98d5.tar.gz
emacs-13ce2d73e47d1c9c10075e7b0b3f9b3fbbae98d5.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 8a08462a844..a255c6d4b9a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3480,11 +3480,43 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
3480 break; 3480 break;
3481 3481
3482 case ConfigureNotify: 3482 case ConfigureNotify:
3483 f = x_any_window_to_frame (event.xconfigure.window);
3483#ifdef USE_X_TOOLKIT 3484#ifdef USE_X_TOOLKIT
3484 /* process done in widget.c */ 3485 if (f
3485 goto OTHER; 3486 && ! event.xconfigure.send_event
3487 && (event.xconfigure.window == XtWindow (f->display.x->widget)))
3488 {
3489 Window win, child;
3490 int win_x, win_y;
3491
3492 /* Find the position of the outside upper-left corner of
3493 the window, in the root coordinate system. Don't
3494 refer to the parent window here; we may be processing
3495 this event after the window manager has changed our
3496 parent, but before we have reached the ReparentNotify. */
3497 XTranslateCoordinates (x_current_display,
3498
3499 /* From-window, to-window. */
3500 XtWindow (f->display.x->widget),
3501 ROOT_WINDOW,
3502
3503 /* From-position, to-position. */
3504 -event.xconfigure.border_width,
3505 -event.xconfigure.border_width,
3506 &win_x, &win_y,
3507
3508 /* Child of win. */
3509 &child);
3510 event.xconfigure.x = win_x;
3511 event.xconfigure.y = win_y;
3512
3513 f->display.x->pixel_width = event.xconfigure.width;
3514 f->display.x->pixel_height = event.xconfigure.height;
3515 f->display.x->left_pos = event.xconfigure.x;
3516 f->display.x->top_pos = event.xconfigure.y;
3517 }
3518 goto OTHER;
3486#else /* not USE_X_TOOLKIT */ 3519#else /* not USE_X_TOOLKIT */
3487 f = x_window_to_frame (event.xconfigure.window);
3488 if (f) 3520 if (f)
3489 { 3521 {
3490 int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); 3522 int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height);