changeset 11707:b0cb8129be58

[USE_X_TOOLKIT] (x_window): Always pass position in geometry. Set XtNmappedWhenManaged to 0 for shell_widget. (Fx_create_frame): Always call x_wm_set_size_hints.
author Richard M. Stallman <rms@gnu.org>
date Fri, 05 May 1995 07:01:59 +0000
parents 0bb32e56cff3
children 0de77f509d07
files src/xfns.c
diffstat 1 files changed, 23 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Fri May 05 05:11:46 1995 +0000
+++ b/src/xfns.c	Fri May 05 07:01:59 1995 +0000
@@ -2369,6 +2369,7 @@
   ac = 0;
   XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
   XtSetArg (al[ac], XtNinput, 1); ac++;
+  XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++;
   shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS,
 				   topLevelShellWidgetClass,
 				   FRAME_X_DISPLAY (f), al, ac);
@@ -2427,24 +2428,26 @@
         menubar_size += ibw;
       }
 
-    if (window_prompting & USPosition)
-      {
-	int left = f->display.x->left_pos;
-	int xneg = window_prompting & XNegative;
-	int top = f->display.x->top_pos;
-	int yneg = window_prompting & YNegative;
-	if (xneg)
-	  left = -left;
-	if (yneg)
-	  top = -top;
-	sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), 
-		 PIXEL_HEIGHT (f) + menubar_size,
-		 (xneg ? '-' : '+'), left,
-		 (yneg ? '-' : '+'), top);
-      }
-    else
-      sprintf (shell_position, "=%dx%d", PIXEL_WIDTH (f), 
-	       PIXEL_HEIGHT (f) + menubar_size);
+    /* Convert our geometry parameters into a geometry string
+       and specify it.
+       Note that we do not specify here whether the position
+       is a user-specified or program-specified one.
+       We pass that information later, in x_wm_set_size_hints.  */
+    {
+      int left = f->display.x->left_pos;
+      int xneg = window_prompting & XNegative;
+      int top = f->display.x->top_pos;
+      int yneg = window_prompting & YNegative;
+      if (xneg)
+	left = -left;
+      if (yneg)
+	top = -top;
+      sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), 
+	       PIXEL_HEIGHT (f) + menubar_size,
+	       (xneg ? '-' : '+'), left,
+	       (yneg ? '-' : '+'), top);
+    }
+
     len = strlen (shell_position) + 1;
     tem = (char *) xmalloc (len);
     strncpy (tem, shell_position, len);
@@ -2939,12 +2942,11 @@
   f->height = f->width = 0;
   change_frame_size (f, height, width, 1, 0);
 
-/* With the toolkit, the geometry management is done in x_window.  */
-#ifndef USE_X_TOOLKIT
+  /* Tell the server what size and position, etc, we want,
+     and how badly we want them.  */
   BLOCK_INPUT;
   x_wm_set_size_hint (f, window_prompting, 0);
   UNBLOCK_INPUT;
-#endif /* USE_X_TOOLKIT */
 
   tem = x_get_arg (parms, Qunsplittable, 0, 0, boolean);
   f->no_split = minibuffer_only || EQ (tem, Qt);