aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-05-28 04:54:48 +0000
committerRichard M. Stallman <[email protected]>1997-05-28 04:54:48 +0000
commitdcb07ae9dc20c48dc4cd12a1e618e12ce6afa61a (patch)
treefb18935aff0b1dc564b8fae892e86b7f1d88dc10 /src/xterm.c
parentf1e0f5469e1b46e0a4e39433d80ac6e3bd64a86c (diff)
(XTread_socket) <ConfigureNotify>: Don't call
x_wm_set_size_hint if window has no parent yet. Simplify the call to x_real_positions. (x_make_frame_visible): Use win_gravity to decide whether to call XMoveWindow. Also, don't do it if frame already visible.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 5c1451e174..b774a00be3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4377,23 +4377,16 @@ XTread_socket (sd, bufp, numchars, expected)
/* What we have now is the position of Emacs's own window.
Convert that to the position of the window manager window. */
- {
- int x, y;
- x_real_positions (f, &x, &y);
- f->output_data.x->left_pos = x;
- f->output_data.x->top_pos = y;
-#if 0
- if (y != event.xconfigure.y)
- {
-#endif
- /* Since the WM decorations come below top_pos now,
- we must put them below top_pos in the future. */
- f->output_data.x->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, (long) 0, 0);
-#if 0
- }
-#endif
- }
+ x_real_positions (f, &f->output_data.x->left_pos,
+ &f->output_data.x->top_pos);
+
+ if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
+ {
+ /* Since the WM decorations come below top_pos now,
+ we must put them below top_pos in the future. */
+ f->output_data.x->win_gravity = NorthWestGravity;
+ x_wm_set_size_hint (f, (long) 0, 0);
+ }
}
goto OTHER;
@@ -5677,9 +5670,13 @@ x_make_frame_visible (f)
/* Arriving X events are processed here. */
- /* Now move the window back to where it was "supposed to be". */
+ /* 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. */
- if (! (starting_flags & (XNegative | YNegative)))
+ if (! FRAME_VISIBLE_P (f)
+ && f->output_data.x->win_gravity == NorthWestGravity)
{
BLOCK_INPUT;