comparison src/frame.c @ 5125:b5df3737028a ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Wed, 24 Feb 2010 01:58:04 -0600
parents 623d57b7fbe8 16112448d484
children 2a462149bd6a
comparison
equal deleted inserted replaced
5124:623d57b7fbe8 5125:b5df3737028a
269 int UNUSED (escapeflag)) 269 int UNUSED (escapeflag))
270 { 270 {
271 struct frame *frm = XFRAME (obj); 271 struct frame *frm = XFRAME (obj);
272 272
273 if (print_readably) 273 if (print_readably)
274 printing_unreadable_object ("#<frame %s 0x%x>", 274 printing_unreadable_lcrecord (obj, XSTRING_DATA (frm->name));
275 XSTRING_DATA (frm->name), frm->header.uid);
276 275
277 write_fmt_string (printcharfun, "#<%s-frame ", !FRAME_LIVE_P (frm) ? "dead" : 276 write_fmt_string (printcharfun, "#<%s-frame ", !FRAME_LIVE_P (frm) ? "dead" :
278 FRAME_TYPE_NAME (frm)); 277 FRAME_TYPE_NAME (frm));
279 print_internal (frm->name, printcharfun, 1); 278 print_internal (frm->name, printcharfun, 1);
280 write_fmt_string (printcharfun, " 0x%x>", frm->header.uid); 279 write_fmt_string (printcharfun, " 0x%x>", frm->header.uid);
523 } 522 }
524 else if (!initialized) 523 else if (!initialized)
525 { 524 {
526 /* We leave Vdefault_frame_name alone here so that it'll remain Qnil 525 /* We leave Vdefault_frame_name alone here so that it'll remain Qnil
527 in the dumped executable, and we can choose it at runtime. */ 526 in the dumped executable, and we can choose it at runtime. */
528 name = build_string("XEmacs"); 527 name = build_ascstring ("XEmacs");
529 } 528 }
530 else if (NILP (Vdefault_frame_name)) 529 else if (NILP (Vdefault_frame_name))
531 { 530 {
532 if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS")) 531 if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS"))
533 { 532 {
534 Vdefault_frame_name = build_string ("emacs"); 533 Vdefault_frame_name = build_ascstring ("emacs");
535 } 534 }
536 else 535 else
537 { 536 {
538 Vdefault_frame_name = build_string ("XEmacs"); 537 Vdefault_frame_name = build_ascstring ("XEmacs");
539 } 538 }
540 } 539 }
541 540
542 if (NILP(name) && STRINGP(Vdefault_frame_name)) 541 if (NILP(name) && STRINGP(Vdefault_frame_name))
543 { 542 {
579 else 578 else
580 invalid_argument ("Invalid value for `minibuffer'", minibuf); 579 invalid_argument ("Invalid value for `minibuffer'", minibuf);
581 580
582 update_frame_window_mirror (f); 581 update_frame_window_mirror (f);
583 582
583 /* #### Do we need to be calling reset_face_cachels here, and then again
584 down below? */
584 if (initialized && !DEVICE_STREAM_P (d)) 585 if (initialized && !DEVICE_STREAM_P (d))
585 { 586 {
586 if (!NILP (f->minibuffer_window)) 587 if (!NILP (f->minibuffer_window))
587 reset_face_cachels (XWINDOW (f->minibuffer_window)); 588 reset_face_cachels (XWINDOW (f->minibuffer_window));
588 reset_face_cachels (XWINDOW (f->root_window)); 589 reset_face_cachels (XWINDOW (f->root_window));
636 methods are called because it may potentially call some things itself 637 methods are called because it may potentially call some things itself
637 which depend on the normal frame methods having initialized 638 which depend on the normal frame methods having initialized
638 things. */ 639 things. */
639 init_frame_toolbars (f); 640 init_frame_toolbars (f);
640 #endif 641 #endif
642 /* Added this assert recently (2-1-10); seems there should be only
643 two windows, root and minibufer. Probably we should just be
644 calling reset_*_cachels on the root window directly instead of the
645 selected window, but I want to make sure they are always the
646 same. --ben */
647 assert (EQ (FRAME_SELECTED_WINDOW (f), f->root_window));
641 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 648 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
642 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 649 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
650 if (!NILP (f->minibuffer_window))
651 {
652 reset_face_cachels (XWINDOW (f->minibuffer_window));
653 reset_glyph_cachels (XWINDOW (f->minibuffer_window));
654 }
643 655
644 change_frame_size (f, f->height, f->width, 0); 656 change_frame_size (f, f->height, f->width, 0);
645 } 657 }
646 658
647 MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); 659 MAYBE_FRAMEMETH (f, init_frame_2, (f, props));
3485 elt++; 3497 elt++;
3486 } 3498 }
3487 3499
3488 return 3500 return
3489 convert_ichar_string_into_malloced_string 3501 convert_ichar_string_into_malloced_string
3490 (Dynarr_atp (title_string_ichar_dynarr, 0), 3502 (Dynarr_begin (title_string_ichar_dynarr),
3491 Dynarr_length (title_string_ichar_dynarr), 0); 3503 Dynarr_length (title_string_ichar_dynarr), 0);
3492 } 3504 }
3493 3505
3494 void 3506 void
3495 update_frame_title (struct frame *f) 3507 update_frame_title (struct frame *f)
3522 if (HAS_FRAMEMETH_P (f, set_icon_name_from_ibyte)) 3534 if (HAS_FRAMEMETH_P (f, set_icon_name_from_ibyte))
3523 { 3535 {
3524 if (!EQ (icon_format, title_format) || !title) 3536 if (!EQ (icon_format, title_format) || !title)
3525 { 3537 {
3526 if (title) 3538 if (title)
3527 xfree (title, Ibyte *); 3539 xfree (title);
3528 3540
3529 title = generate_title_string (w, icon_format, 3541 title = generate_title_string (w, icon_format,
3530 DEFAULT_INDEX, CURRENT_DISP); 3542 DEFAULT_INDEX, CURRENT_DISP);
3531 } 3543 }
3532 FRAMEMETH (f, set_icon_name_from_ibyte, (f, title)); 3544 FRAMEMETH (f, set_icon_name_from_ibyte, (f, title));
3533 } 3545 }
3534 3546
3535 if (title) 3547 if (title)
3536 xfree (title, Ibyte *); 3548 xfree (title);
3537 } 3549 }
3538 3550
3539 3551
3540 DEFUN ("set-frame-pointer", Fset_frame_pointer, 2, 2, 0, /* 3552 DEFUN ("set-frame-pointer", Fset_frame_pointer, 2, 2, 0, /*
3541 Set the mouse pointer of FRAME to the given pointer image instance. 3553 Set the mouse pointer of FRAME to the given pointer image instance.
3856 %- is ignored. 3868 %- is ignored.
3857 */ ); 3869 */ );
3858 /* #### I would change this unilaterally but for the wrath of the Kyles 3870 /* #### I would change this unilaterally but for the wrath of the Kyles
3859 of the world. */ 3871 of the world. */
3860 #ifdef WIN32_NATIVE 3872 #ifdef WIN32_NATIVE
3861 Vframe_title_format = build_string ("%b - XEmacs"); 3873 Vframe_title_format = build_ascstring ("%b - XEmacs");
3862 #else 3874 #else
3863 Vframe_title_format = build_string ("%S: %b"); 3875 Vframe_title_format = build_ascstring ("%S: %b");
3864 #endif 3876 #endif
3865 3877
3866 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /* 3878 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /*
3867 Controls the title of the icon corresponding to the selected frame. 3879 Controls the title of the icon corresponding to the selected frame.
3868 See also the variable `frame-title-format'. 3880 See also the variable `frame-title-format'.
3869 */ ); 3881 */ );
3870 Vframe_icon_title_format = build_string ("%b"); 3882 Vframe_icon_title_format = build_ascstring ("%b");
3871 3883
3872 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* 3884 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /*
3873 The default name to assign to newly-created frames. 3885 The default name to assign to newly-created frames.
3874 This can be overridden by arguments to `make-frame'. This must be a string. 3886 This can be overridden by arguments to `make-frame'. This must be a string.
3875 This is used primarily for picking up X resources, and is *not* the title 3887 This is used primarily for picking up X resources, and is *not* the title