Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
64 Lisp_Object Vx_initial_argv_list; /* #### ugh! */ | 64 Lisp_Object Vx_initial_argv_list; /* #### ugh! */ |
65 | 65 |
66 static XrmOptionDescRec emacs_options[] = | 66 static XrmOptionDescRec emacs_options[] = |
67 { | 67 { |
68 {"-geometry", ".geometry", XrmoptionSepArg, NULL}, | 68 {"-geometry", ".geometry", XrmoptionSepArg, NULL}, |
69 {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, | 69 {"-iconic", ".iconic", XrmoptionNoArg, "yes"}, |
70 | 70 |
71 {"-internal-border-width", "*EmacsFrame.internalBorderWidth", | 71 {"-internal-border-width", "*EmacsFrame.internalBorderWidth", |
72 XrmoptionSepArg, NULL}, | 72 XrmoptionSepArg, NULL}, |
73 {"-ib", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, | 73 {"-ib", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, |
74 {"-scrollbar-width", "*EmacsFrame.scrollBarWidth", XrmoptionSepArg, NULL}, | 74 {"-scrollbar-width", "*EmacsFrame.scrollBarWidth", XrmoptionSepArg, NULL}, |
150 /************************************************************************/ | 150 /************************************************************************/ |
151 | 151 |
152 static void | 152 static void |
153 allocate_x_device_struct (struct device *d) | 153 allocate_x_device_struct (struct device *d) |
154 { | 154 { |
155 d->device_data = (struct x_device *) xmalloc (sizeof (struct x_device)); | 155 d->device_data = xnew_and_zero (struct x_device); |
156 | |
157 /* zero out all slots. */ | |
158 memset (d->device_data, 0, sizeof (struct x_device)); | |
159 } | 156 } |
160 | 157 |
161 static void | 158 static void |
162 Xatoms_of_device_x (struct device *d) | 159 Xatoms_of_device_x (struct device *d) |
163 { | 160 { |
297 #ifdef HAVE_XIM | 294 #ifdef HAVE_XIM |
298 XIM_init_device(d); | 295 XIM_init_device(d); |
299 #endif /* HAVE_XIM */ | 296 #endif /* HAVE_XIM */ |
300 | 297 |
301 #ifdef HAVE_SESSION | 298 #ifdef HAVE_SESSION |
302 XtVaSetValues(DEVICE_XT_APP_SHELL (d), | |
303 XtNmappedWhenManaged, False, | |
304 XtNwidth, 1, | |
305 XtNheight, 1, | |
306 NULL); | |
307 XtRealizeWidget(DEVICE_XT_APP_SHELL (d)); | |
308 { | 299 { |
309 int argc; | 300 Arg al[3]; |
310 char **argv; | 301 Widget shell = DEVICE_XT_APP_SHELL (d); |
311 | 302 |
312 make_argc_argv (Vcommand_line_args, &argc, &argv); | 303 XtSetArg (al [0], XtNmappedWhenManaged, False); |
313 XSetCommand (XtDisplay (DEVICE_XT_APP_SHELL (d)), | 304 XtSetArg (al [1],XtNwidth, 1); |
314 XtWindow (DEVICE_XT_APP_SHELL (d)), argv, argc); | 305 XtSetArg (al [2],XtNheight, 1); |
315 free_argc_argv (argv); | 306 XtSetValues (shell, al, 3); |
316 | 307 XtRealizeWidget (shell); |
308 | |
309 { | |
310 int new_argc; | |
311 char **new_argv; | |
312 make_argc_argv (Vcommand_line_args, &new_argc, &new_argv); | |
313 XSetCommand (XtDisplay (shell), XtWindow (shell), new_argv, new_argc); | |
314 free_argc_argv (new_argv); | |
315 } | |
317 } | 316 } |
318 #endif /* HAVE_SESSION */ | 317 #endif /* HAVE_SESSION */ |
319 | 318 |
320 Vx_initial_argv_list = make_arg_list (argc, argv); | 319 Vx_initial_argv_list = make_arg_list (argc, argv); |
321 free_argc_argv (argv); | 320 free_argc_argv (argv); |