# HG changeset patch # User Karl Heuer # Date 801283521 0 # Node ID 1f70ffad3d6d31e6fb2f5e734dbe5e1294136455 # Parent 6be0b7a0ac4443651a2b07b423e02d9b66db9c15 [USE_X_TOOLKIT] (x_window): Pass position to toolkit only if user-specified. But always use XMoveWindow to move the window to that position. diff -r 6be0b7a0ac44 -r 1f70ffad3d6d src/xfns.c --- 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)