Mercurial > emacs
comparison src/xfns.c @ 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 | 8b3575269610 |
children | b20c45d49063 |
comparison
equal
deleted
inserted
replaced
11892:6be0b7a0ac44 | 11893:1f70ffad3d6d |
---|---|
2441 int yneg = window_prompting & YNegative; | 2441 int yneg = window_prompting & YNegative; |
2442 if (xneg) | 2442 if (xneg) |
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; |
2453 tem = (char *) xmalloc (len); | 2458 tem = (char *) xmalloc (len); |
2454 strncpy (tem, shell_position, len); | 2459 strncpy (tem, shell_position, len); |
2510 x_set_name (f, name, explicit); | 2515 x_set_name (f, name, explicit); |
2511 } | 2516 } |
2512 | 2517 |
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); |
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); | |
2515 | 2526 |
2516 UNBLOCK_INPUT; | 2527 UNBLOCK_INPUT; |
2517 | 2528 |
2518 if (FRAME_X_WINDOW (f) == 0) | 2529 if (FRAME_X_WINDOW (f) == 0) |
2519 error ("Unable to create window"); | 2530 error ("Unable to create window"); |