diff options
| author | Karl Heuer | 1995-05-24 02:45:21 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-05-24 02:45:21 +0000 |
| commit | c760f47e2d2166749435fcc6dc254a2442931a58 (patch) | |
| tree | 13ae99b7e70e39a56c2adbf631eb5ef39fb7a784 /src | |
| parent | 58595309d2ce3c8fe67a6353390146940e8f2009 (diff) | |
| download | emacs-c760f47e2d2166749435fcc6dc254a2442931a58.tar.gz emacs-c760f47e2d2166749435fcc6dc254a2442931a58.zip | |
[USE_X_TOOLKIT] (x_window): Pass position to toolkit
only if user-specified. But always use XMoveWindow to move the
window to that position.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index f1fbd800518..ebb631716eb 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2443,10 +2443,15 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2443 | left = -left; | 2443 | left = -left; |
| 2444 | if (yneg) | 2444 | if (yneg) |
| 2445 | top = -top; | 2445 | top = -top; |
| 2446 | sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), | 2446 | |
| 2447 | PIXEL_HEIGHT (f) + menubar_size, | 2447 | if (window_prompting & USPosition) |
| 2448 | (xneg ? '-' : '+'), left, | 2448 | sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), |
| 2449 | (yneg ? '-' : '+'), top); | 2449 | PIXEL_HEIGHT (f) + menubar_size, |
| 2450 | (xneg ? '-' : '+'), left, | ||
| 2451 | (yneg ? '-' : '+'), top); | ||
| 2452 | else | ||
| 2453 | sprintf (shell_position, "=%dx%d", PIXEL_WIDTH (f), | ||
| 2454 | PIXEL_HEIGHT (f) + menubar_size); | ||
| 2450 | } | 2455 | } |
| 2451 | 2456 | ||
| 2452 | len = strlen (shell_position) + 1; | 2457 | len = strlen (shell_position) + 1; |
| @@ -2513,6 +2518,12 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2513 | XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 2518 | XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 2514 | f->display.x->text_cursor); | 2519 | f->display.x->text_cursor); |
| 2515 | 2520 | ||
| 2521 | /* If we have a program-specified position, communicate it to | ||
| 2522 | the window manager thus. */ | ||
| 2523 | if (FRAME_X_WINDOW (f)) | ||
| 2524 | XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget), | ||
| 2525 | f->display.x->left_pos, f->display.x->top_pos); | ||
| 2526 | |||
| 2516 | UNBLOCK_INPUT; | 2527 | UNBLOCK_INPUT; |
| 2517 | 2528 | ||
| 2518 | if (FRAME_X_WINDOW (f) == 0) | 2529 | if (FRAME_X_WINDOW (f) == 0) |