Mercurial > emacs
changeset 11893:1f70ffad3d6d
[USE_X_TOOLKIT] (x_window): Pass position to toolkit
only if user-specified. But always use XMoveWindow to move the
window to that position.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 24 May 1995 02:45:21 +0000 |
parents | 6be0b7a0ac44 |
children | b20c45d49063 |
files | src/xfns.c |
diffstat | 1 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Wed May 24 01:39:24 1995 +0000 +++ b/src/xfns.c Wed May 24 02:45:21 1995 +0000 @@ -2443,10 +2443,15 @@ 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); + + if (window_prompting & USPosition) + 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); } len = strlen (shell_position) + 1; @@ -2513,6 +2518,12 @@ XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), f->display.x->text_cursor); + /* If we have a program-specified position, communicate it to + the window manager thus. */ + if (FRAME_X_WINDOW (f)) + XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget), + f->display.x->left_pos, f->display.x->top_pos); + UNBLOCK_INPUT; if (FRAME_X_WINDOW (f) == 0)