aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/widget.c b/src/widget.c
index e219c200e00..b94c30f4e9c 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -429,25 +429,15 @@ set_frame_size (EmacsFrame ew)
429 { 429 {
430 /* the tricky things with the sign is to make sure that 430 /* the tricky things with the sign is to make sure that
431 -0 is printed -0. */ 431 -0 is printed -0. */
432 int len;
433 char *tem;
434 sprintf (shell_position, "=%c%d%c%d", 432 sprintf (shell_position, "=%c%d%c%d",
435 flags & XNegative ? '-' : '+', x < 0 ? -x : x, 433 flags & XNegative ? '-' : '+', x < 0 ? -x : x,
436 flags & YNegative ? '-' : '+', y < 0 ? -y : y); 434 flags & YNegative ? '-' : '+', y < 0 ? -y : y);
437 len = strlen (shell_position) + 1; 435 XtVaSetValues (wmshell, XtNgeometry, xstrdup (shell_position), NULL);
438 tem = xmalloc (len);
439 strncpy (tem, shell_position, len);
440 XtVaSetValues (wmshell, XtNgeometry, tem, NULL);
441 } 436 }
442 else if (flags & (WidthValue | HeightValue)) 437 else if (flags & (WidthValue | HeightValue))
443 { 438 {
444 int len;
445 char *tem;
446 sprintf (shell_position, "=%dx%d", pixel_width, pixel_height); 439 sprintf (shell_position, "=%dx%d", pixel_width, pixel_height);
447 len = strlen (shell_position) + 1; 440 XtVaSetValues (wmshell, XtNgeometry, xstrdup (shell_position), NULL);
448 tem = xmalloc (len);
449 strncpy (tem, shell_position, len);
450 XtVaSetValues (wmshell, XtNgeometry, tem, NULL);
451 } 441 }
452 442
453 /* If the geometry spec we're using has W/H components, mark the size 443 /* If the geometry spec we're using has W/H components, mark the size