comparison src/xterm.c @ 11901:8ecc60a02138

(x_set_offset): Add border_width when calling XMoveWindow.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 May 1995 04:54:34 +0000
parents 507a45c7e911
children 0d37c1e81c0d
comparison
equal deleted inserted replaced
11900:54186a96c5b2 11901:8ecc60a02138
4796 x_set_offset (f, xoff, yoff, change_gravity) 4796 x_set_offset (f, xoff, yoff, change_gravity)
4797 struct frame *f; 4797 struct frame *f;
4798 register int xoff, yoff; 4798 register int xoff, yoff;
4799 int change_gravity; 4799 int change_gravity;
4800 { 4800 {
4801 int modified_top, modified_left;
4802
4801 if (change_gravity) 4803 if (change_gravity)
4802 { 4804 {
4803 f->display.x->top_pos = yoff; 4805 f->display.x->top_pos = yoff;
4804 f->display.x->left_pos = xoff; 4806 f->display.x->left_pos = xoff;
4805 f->display.x->size_hint_flags &= ~ (XNegative | YNegative); 4807 f->display.x->size_hint_flags &= ~ (XNegative | YNegative);
4812 x_calc_absolute_position (f); 4814 x_calc_absolute_position (f);
4813 4815
4814 BLOCK_INPUT; 4816 BLOCK_INPUT;
4815 x_wm_set_size_hint (f, 0, 0); 4817 x_wm_set_size_hint (f, 0, 0);
4816 4818
4819 /* It is a mystery why we need to add the border_width here
4820 when the frame is already visible, but experiment says we do. */
4821 modified_left = f->display.x->left_pos;
4822 modified_top = f->display.x->top_pos;
4823 if (change_gravity)
4824 {
4825 modified_left += f->display.x->border_width;
4826 modified_top += f->display.x->border_width;
4827 }
4828
4817 #ifdef USE_X_TOOLKIT 4829 #ifdef USE_X_TOOLKIT
4818 XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget), 4830 XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
4819 f->display.x->left_pos, f->display.x->top_pos); 4831 modified_left, modified_top);
4820 #else /* not USE_X_TOOLKIT */ 4832 #else /* not USE_X_TOOLKIT */
4821 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4833 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4822 f->display.x->left_pos, f->display.x->top_pos); 4834 modified_left, modified_top);
4823 #endif /* not USE_X_TOOLKIT */ 4835 #endif /* not USE_X_TOOLKIT */
4824 UNBLOCK_INPUT; 4836 UNBLOCK_INPUT;
4825 } 4837 }
4826 4838
4827 /* Call this to change the size of frame F's x-window. 4839 /* Call this to change the size of frame F's x-window.