From: Karl Heuer Date: Wed, 24 May 1995 02:45:21 +0000 (+0000) Subject: [USE_X_TOOLKIT] (x_window): Pass position to toolkit X-Git-Tag: emacs-19.34~3965 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c760f47e2d2166749435fcc6dc254a2442931a58;p=emacs.git [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 --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) 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 @@ x_window (f, window_prompting, minibuffer_only) 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)