diff options
| author | Richard M. Stallman | 1995-05-05 07:01:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-05 07:01:59 +0000 |
| commit | 977871735e03b399b0e42d069dcebcb8af1709e2 (patch) | |
| tree | edeee04111934a4c11161358cc69d5c3accd3f7a /src | |
| parent | a79ffd75a83e3fdeff106ad88f0a5ecbe8050817 (diff) | |
| download | emacs-977871735e03b399b0e42d069dcebcb8af1709e2.tar.gz emacs-977871735e03b399b0e42d069dcebcb8af1709e2.zip | |
[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')
| -rw-r--r-- | src/xfns.c | 44 |
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) | |||
| 2369 | ac = 0; | 2369 | ac = 0; |
| 2370 | XtSetArg (al[ac], XtNallowShellResize, 1); ac++; | 2370 | XtSetArg (al[ac], XtNallowShellResize, 1); ac++; |
| 2371 | XtSetArg (al[ac], XtNinput, 1); ac++; | 2371 | XtSetArg (al[ac], XtNinput, 1); ac++; |
| 2372 | XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++; | ||
| 2372 | shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS, | 2373 | shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS, |
| 2373 | topLevelShellWidgetClass, | 2374 | topLevelShellWidgetClass, |
| 2374 | FRAME_X_DISPLAY (f), al, ac); | 2375 | FRAME_X_DISPLAY (f), al, ac); |
| @@ -2427,24 +2428,26 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2427 | menubar_size += ibw; | 2428 | menubar_size += ibw; |
| 2428 | } | 2429 | } |
| 2429 | 2430 | ||
| 2430 | if (window_prompting & USPosition) | 2431 | /* Convert our geometry parameters into a geometry string |
| 2431 | { | 2432 | and specify it. |
| 2432 | int left = f->display.x->left_pos; | 2433 | Note that we do not specify here whether the position |
| 2433 | int xneg = window_prompting & XNegative; | 2434 | is a user-specified or program-specified one. |
| 2434 | int top = f->display.x->top_pos; | 2435 | We pass that information later, in x_wm_set_size_hints. */ |
| 2435 | int yneg = window_prompting & YNegative; | 2436 | { |
| 2436 | if (xneg) | 2437 | int left = f->display.x->left_pos; |
| 2437 | left = -left; | 2438 | int xneg = window_prompting & XNegative; |
| 2438 | if (yneg) | 2439 | int top = f->display.x->top_pos; |
| 2439 | top = -top; | 2440 | int yneg = window_prompting & YNegative; |
| 2440 | sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), | 2441 | if (xneg) |
| 2441 | PIXEL_HEIGHT (f) + menubar_size, | 2442 | left = -left; |
| 2442 | (xneg ? '-' : '+'), left, | 2443 | if (yneg) |
| 2443 | (yneg ? '-' : '+'), top); | 2444 | top = -top; |
| 2444 | } | 2445 | sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), |
| 2445 | else | 2446 | PIXEL_HEIGHT (f) + menubar_size, |
| 2446 | sprintf (shell_position, "=%dx%d", PIXEL_WIDTH (f), | 2447 | (xneg ? '-' : '+'), left, |
| 2447 | PIXEL_HEIGHT (f) + menubar_size); | 2448 | (yneg ? '-' : '+'), top); |
| 2449 | } | ||
| 2450 | |||
| 2448 | len = strlen (shell_position) + 1; | 2451 | len = strlen (shell_position) + 1; |
| 2449 | tem = (char *) xmalloc (len); | 2452 | tem = (char *) xmalloc (len); |
| 2450 | strncpy (tem, shell_position, len); | 2453 | strncpy (tem, shell_position, len); |
| @@ -2939,12 +2942,11 @@ This function is an internal primitive--use `make-frame' instead.") | |||
| 2939 | f->height = f->width = 0; | 2942 | f->height = f->width = 0; |
| 2940 | change_frame_size (f, height, width, 1, 0); | 2943 | change_frame_size (f, height, width, 1, 0); |
| 2941 | 2944 | ||
| 2942 | /* With the toolkit, the geometry management is done in x_window. */ | 2945 | /* Tell the server what size and position, etc, we want, |
| 2943 | #ifndef USE_X_TOOLKIT | 2946 | and how badly we want them. */ |
| 2944 | BLOCK_INPUT; | 2947 | BLOCK_INPUT; |
| 2945 | x_wm_set_size_hint (f, window_prompting, 0); | 2948 | x_wm_set_size_hint (f, window_prompting, 0); |
| 2946 | UNBLOCK_INPUT; | 2949 | UNBLOCK_INPUT; |
| 2947 | #endif /* USE_X_TOOLKIT */ | ||
| 2948 | 2950 | ||
| 2949 | tem = x_get_arg (parms, Qunsplittable, 0, 0, boolean); | 2951 | tem = x_get_arg (parms, Qunsplittable, 0, 0, boolean); |
| 2950 | f->no_split = minibuffer_only || EQ (tem, Qt); | 2952 | f->no_split = minibuffer_only || EQ (tem, Qt); |