]> git.eshelyaron.com Git - emacs.git/commitdiff
* xfns.c (x_window): Set XtNx and XtNy in shell widget for
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 9 Nov 2003 16:26:48 +0000 (16:26 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 9 Nov 2003 16:26:48 +0000 (16:26 +0000)
  program specified positions.

src/ChangeLog
src/xfns.c

index e2d1a9b42de7edde4a3b2e37af623e805c4952a2..d9307fa6675c07a046c98273fd83d3fe01155dc5 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-09  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xfns.c (x_window): Set XtNx and XtNy in shell widget for
+       program specified positions.
+
 2003-11-08  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * xterm.c (XAW_ARROW_SCROLLBARS): Define it for Xaw 1.5E.
index b188ee3a43d78fb95378ce5c2acc94a0dcfad428..e4742b1d36d66703be41f2809f387d4ce9dd5108 100644 (file)
@@ -2670,7 +2670,7 @@ x_window (f, window_prompting, minibuffer_only)
   {
     int len;
     char *tem, shell_position[32];
-    Arg al[2];
+    Arg al[10];
     int ac = 0;
     int extra_borders = 0;
     int menubar_size
@@ -2722,9 +2722,19 @@ x_window (f, window_prompting, minibuffer_only)
                 (xneg ? '-' : '+'), left,
                 (yneg ? '-' : '+'), top);
       else
-       sprintf (shell_position, "=%dx%d",
-                FRAME_PIXEL_WIDTH (f) + extra_borders,
-                FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders);
+        {
+          sprintf (shell_position, "=%dx%d",
+                   FRAME_PIXEL_WIDTH (f) + extra_borders,
+                   FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders);
+
+          /* Setting x and y when the position is not specified in
+             the geometry string will set program position in the WM hints.
+             If Emacs had just one program position, we could set it in
+             fallback resources, but since each make-frame call can specify
+             different program positions, this is easier.  */
+          XtSetArg (al[ac], XtNx, left); ac++;
+          XtSetArg (al[ac], XtNy, top); ac++;
+        }
     }
 
     len = strlen (shell_position) + 1;