comparison src/xterm.c @ 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 a9f61727a90c
children b69bdef4f7f6
comparison
equal deleted inserted replaced
6087:00fbbb620f36 6088:8e38fcb2df96
3478 goto OTHER; 3478 goto OTHER;
3479 #endif /* USE_X_TOOLKIT */ 3479 #endif /* USE_X_TOOLKIT */
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);
3491 int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); 3523 int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width);
3492 3524