comparison src/xfns.c @ 83488:f47495b26508

Fix ediff problems. (Reported by Dan Nicolaescu.) * lisp/subr.el (with-selected-frame): Make sure the current buffer is restored as well. * src/xfns.c (Fx_create_frame): Use `store_frame_param' to set `window-system' frame parameter, and make sure it overrides any user-supplied setting. * src/xfns.c (x_icon): Disable redundant call to `x_wm_set_window_state'. (Also applied in CVS.) * lisp/faces.el (x-create-frame-with-faces): Don't make frame visible until we are done setting up all its parameters. * lisp/ediff-wind.el (ediff-setup-windows-automatic): New function. (ediff-window-setup-function): Use it as default. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-528
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 12 Mar 2006 04:12:31 +0000
parents 8976b9f5eda1
children 0cdee8b991e1
comparison
equal deleted inserted replaced
83487:414faf8dce4e 83488:f47495b26508
2828 BLOCK_INPUT; 2828 BLOCK_INPUT;
2829 2829
2830 if (! EQ (icon_x, Qunbound)) 2830 if (! EQ (icon_x, Qunbound))
2831 x_wm_set_icon_position (f, XINT (icon_x), XINT (icon_y)); 2831 x_wm_set_icon_position (f, XINT (icon_x), XINT (icon_y));
2832 2832
2833 #if 0 /* x_get_arg removes the visibility parameter as a side effect,
2834 but x_create_frame still needs it. */
2833 /* Start up iconic or window? */ 2835 /* Start up iconic or window? */
2834 x_wm_set_window_state 2836 x_wm_set_window_state
2835 (f, (EQ (x_get_arg (dpyinfo, parms, Qvisibility, 0, 0, RES_TYPE_SYMBOL), 2837 (f, (EQ (x_get_arg (dpyinfo, parms, Qvisibility, 0, 0, RES_TYPE_SYMBOL),
2836 Qicon) 2838 Qicon)
2837 ? IconicState 2839 ? IconicState
2838 : NormalState)); 2840 : NormalState));
2841 #endif
2839 2842
2840 x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) 2843 x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name)
2841 ? f->icon_name 2844 ? f->icon_name
2842 : f->name))); 2845 : f->name)));
2843 2846
3166 f->name = name; 3169 f->name = name;
3167 f->explicit_name = 1; 3170 f->explicit_name = 1;
3168 /* use the frame's title when getting resources for this frame. */ 3171 /* use the frame's title when getting resources for this frame. */
3169 specbind (Qx_resource_name, name); 3172 specbind (Qx_resource_name, name);
3170 } 3173 }
3171
3172 Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
3173 3174
3174 /* Extract the window parameters from the supplied values 3175 /* Extract the window parameters from the supplied values
3175 that are needed to determine window geometry. */ 3176 that are needed to determine window geometry. */
3176 { 3177 {
3177 Lisp_Object font; 3178 Lisp_Object font;
3407 /* All remaining specified parameters, which have not been "used" 3408 /* All remaining specified parameters, which have not been "used"
3408 by x_get_arg and friends, now go in the misc. alist of the frame. */ 3409 by x_get_arg and friends, now go in the misc. alist of the frame. */
3409 for (tem = parms; !NILP (tem); tem = XCDR (tem)) 3410 for (tem = parms; !NILP (tem); tem = XCDR (tem))
3410 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) 3411 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
3411 f->param_alist = Fcons (XCAR (tem), f->param_alist); 3412 f->param_alist = Fcons (XCAR (tem), f->param_alist);
3413
3414 store_frame_param (f, Qwindow_system, Qx);
3412 3415
3413 UNGCPRO; 3416 UNGCPRO;
3414 3417
3415 /* Make sure windows on this frame appear in calls to next-window 3418 /* Make sure windows on this frame appear in calls to next-window
3416 and similar functions. */ 3419 and similar functions. */