changeset 6935:675e4ec5f14f

(Fx_create_frame): Delete excess args to x_wm_set_size_hint. Set win_gravity field. (x_window, both versions): Don't call x_calc_absolute_position.
author Richard M. Stallman <rms@gnu.org>
date Sun, 17 Apr 1994 19:31:31 +0000
parents e0ab4f59004e
children 5538df04e96a
files src/xfns.c
diffstat 1 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Sun Apr 17 19:30:06 1994 +0000
+++ b/src/xfns.c	Sun Apr 17 19:31:31 1994 +0000
@@ -1890,8 +1890,6 @@
   XSetWindowAttributes attributes;
   unsigned long attribute_mask;
 
-  x_calc_absolute_position (f);
-
   attributes.background_pixel = f->display.x->background_pixel;
   attributes.border_pixel = f->display.x->border_pixel;
   attributes.bit_gravity = StaticGravity;
@@ -2082,7 +2080,7 @@
 {
 #ifdef HAVE_X11
   struct frame *f;
-  Lisp_Object frame, tem, tem0, tem1;
+  Lisp_Object frame, tem;
   Lisp_Object name;
   int minibuffer_only = 0;
   long window_prompting = 0;
@@ -2204,6 +2202,22 @@
   f->display.x->parent_desc = ROOT_WINDOW;
   window_prompting = x_figure_window_size (f, parms);
 
+  switch (((f->display.x->left_pos < 0) << 1) + (f->display.x->top_pos < 0))
+    {
+    case 0:
+      f->display.x->win_gravity = NorthWestGravity;
+      break;
+    case 1:
+      f->display.x->win_gravity = SouthWestGravity;
+      break;
+    case 2:
+      f->display.x->win_gravity = NorthEastGravity;
+      break;
+    case 3:
+      f->display.x->win_gravity = SouthEastGravity;
+      break;
+    }
+
 #ifdef USE_X_TOOLKIT
   x_window (f, window_prompting, minibuffer_only);
 #else
@@ -2235,10 +2249,8 @@
 
 /* With the toolkit, the geometry management is done in x_window.  */
 #ifndef USE_X_TOOLKIT
-  tem0 = x_get_arg (parms, Qleft, 0, 0, number);
-  tem1 = x_get_arg (parms, Qtop, 0, 0, number);
   BLOCK_INPUT;
-  x_wm_set_size_hint (f, window_prompting, 1, XINT (tem0), XINT (tem1));
+  x_wm_set_size_hint (f, window_prompting, 1);
   UNBLOCK_INPUT;
 #endif /* USE_X_TOOLKIT */