Commit c760f47e authored by Karl Heuer's avatar Karl Heuer

[USE_X_TOOLKIT] (x_window): Pass position to toolkit

only if user-specified.  But always use XMoveWindow to move the
window to that position.
parent 58595309
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment