Mercurial > hg > xemacs-beta
diff src/device-x.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | e121b013d1f0 |
children | b405438285a2 |
line wrap: on
line diff
--- a/src/device-x.c Mon Aug 13 09:54:24 2007 +0200 +++ b/src/device-x.c Mon Aug 13 09:55:28 2007 +0200 @@ -66,7 +66,7 @@ static XrmOptionDescRec emacs_options[] = { {"-geometry", ".geometry", XrmoptionSepArg, NULL}, - {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, + {"-iconic", ".iconic", XrmoptionNoArg, "yes"}, {"-internal-border-width", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, @@ -152,10 +152,7 @@ static void allocate_x_device_struct (struct device *d) { - d->device_data = (struct x_device *) xmalloc (sizeof (struct x_device)); - - /* zero out all slots. */ - memset (d->device_data, 0, sizeof (struct x_device)); + d->device_data = xnew_and_zero (struct x_device); } static void @@ -299,21 +296,23 @@ #endif /* HAVE_XIM */ #ifdef HAVE_SESSION - XtVaSetValues(DEVICE_XT_APP_SHELL (d), - XtNmappedWhenManaged, False, - XtNwidth, 1, - XtNheight, 1, - NULL); - XtRealizeWidget(DEVICE_XT_APP_SHELL (d)); { - int argc; - char **argv; + Arg al[3]; + Widget shell = DEVICE_XT_APP_SHELL (d); - make_argc_argv (Vcommand_line_args, &argc, &argv); - XSetCommand (XtDisplay (DEVICE_XT_APP_SHELL (d)), - XtWindow (DEVICE_XT_APP_SHELL (d)), argv, argc); - free_argc_argv (argv); + XtSetArg (al [0], XtNmappedWhenManaged, False); + XtSetArg (al [1],XtNwidth, 1); + XtSetArg (al [2],XtNheight, 1); + XtSetValues (shell, al, 3); + XtRealizeWidget (shell); + { + int new_argc; + char **new_argv; + make_argc_argv (Vcommand_line_args, &new_argc, &new_argv); + XSetCommand (XtDisplay (shell), XtWindow (shell), new_argv, new_argc); + free_argc_argv (new_argv); + } } #endif /* HAVE_SESSION */