summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-05-05 07:01:59 +0000
committerRichard M. Stallman <rms@gnu.org>1995-05-05 07:01:59 +0000
commite24fd99e8e6b5e332a9a003100f7048f207706bd (patch)
tree682c6afede2a27a5af744ef2b39def9ae5d77aaf /src/xfns.c
parentda35fa978455d675e8e7af5b9711cecc304a3f18 (diff)
downloademacs-e24fd99e8e6b5e332a9a003100f7048f207706bd.tar.gz
[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.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/xfns.c b/src/xfns.c
index cbead0ce9fa..722c6791dc1 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2369,6 +2369,7 @@ x_window (f, window_prompting, minibuffer_only)
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 @@ x_window (f, window_prompting, minibuffer_only)
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 @@ This function is an internal primitive--use `make-frame' instead.")
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);