/* The emacs frame widget.
- Copyright (C) 1992-1993, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1992-1993, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
{
/* the tricky things with the sign is to make sure that
-0 is printed -0. */
- int len;
- char *tem;
sprintf (shell_position, "=%c%d%c%d",
flags & XNegative ? '-' : '+', x < 0 ? -x : x,
flags & YNegative ? '-' : '+', y < 0 ? -y : y);
- len = strlen (shell_position) + 1;
- tem = (char *) xmalloc (len);
- strncpy (tem, shell_position, len);
- XtVaSetValues (wmshell, XtNgeometry, tem, NULL);
+ XtVaSetValues (wmshell, XtNgeometry, xstrdup (shell_position), NULL);
}
else if (flags & (WidthValue | HeightValue))
{
- int len;
- char *tem;
sprintf (shell_position, "=%dx%d", pixel_width, pixel_height);
- len = strlen (shell_position) + 1;
- tem = (char *) xmalloc (len);
- strncpy (tem, shell_position, len);
- XtVaSetValues (wmshell, XtNgeometry, tem, NULL);
+ XtVaSetValues (wmshell, XtNgeometry, xstrdup (shell_position), NULL);
}
/* If the geometry spec we're using has W/H components, mark the size
int base_height;
int min_rows = 0, min_cols = 0;
+ /* This happens when the frame is just created. */
+ if (! wmshell) return;
+
#if 0
check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols);
#endif
NULL);
}
+void
+widget_update_wm_size_hints (Widget widget)
+{
+ EmacsFrame ew = (EmacsFrame)widget;
+ update_wm_hints (ew);
+}
+
+
#if 0
static void
return result->request_mode ? XtGeometryAlmost : XtGeometryYes;
}
-/* Special entrypoints */
+/* Special entry points */
void
EmacsFrameSetCharSize (Widget widget, int columns, int rows)
{