aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-05-24 04:54:34 +0000
committerKarl Heuer1995-05-24 04:54:34 +0000
commit4a4cbdd52890e39403fbae1cca0df762ee42a683 (patch)
treededdf4cbea8dd8ed0a2ded63489da40c0aabc7aa /src
parent07a63816030b4a5b76a07990fe2a2ec711030009 (diff)
downloademacs-4a4cbdd52890e39403fbae1cca0df762ee42a683.tar.gz
emacs-4a4cbdd52890e39403fbae1cca0df762ee42a683.zip
(x_set_offset): Add border_width when calling XMoveWindow.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1a00bd3c0cd..cf6f6987792 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4798,6 +4798,8 @@ x_set_offset (f, xoff, yoff, change_gravity)
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;
@@ -4814,12 +4816,22 @@ x_set_offset (f, xoff, yoff, change_gravity)
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}