summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-02 04:41:00 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-02 04:41:00 +0000
commit535e5b3ea3fdabcb2b279dab82c0e2c905780f89 (patch)
treeae11d235f958ff116570e6ddd0c0793b044da675 /src
parenta4c8a235e377edf4aa9216245fc8d109266d0bdd (diff)
downloademacs-535e5b3ea3fdabcb2b279dab82c0e2c905780f89.tar.gz
(x_make_frame_visible): Check has_been_visible
field before the UNBLOCK_INPUT.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 934f3de3995..6393ae5202e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5687,6 +5687,10 @@ x_make_frame_visible (f)
{
Lisp_Object frame;
int count = input_signal_count;
+ /* This must be before UNBLOCK_INPUT
+ since events that arrive in response to the actions above
+ will set it when they are handled. */
+ int previously_visible = f->output_data.x->has_been_visible;
original_left = f->output_data.x->left_pos;
original_top = f->output_data.x->top_pos;
@@ -5699,11 +5703,15 @@ x_make_frame_visible (f)
/* Now move the window back to where it was "supposed to be".
But don't do it if the gravity is negative.
When the gravity is negative, this uses a position
- that is 3 pixels too low. Perhaps that's really the border width. */
+ that is 3 pixels too low. Perhaps that's really the border width.
+
+ Don't do this if the window has never been visible before,
+ because the window manager may choose the position
+ and we don't want to override it. */
if (! FRAME_VISIBLE_P (f)
&& f->output_data.x->win_gravity == NorthWestGravity
- && f->output_data.x->has_been_visible)
+ && previously_visible)
{
BLOCK_INPUT;