Mercurial > hg > xemacs-beta
comparison src/frame.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* Generic frame functions. | 1 /* Generic frame functions. |
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | 2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
3 Copyright (C) 1995, 1996 Ben Wing. | 3 Copyright (C) 1995, 1996, 2002 Ben Wing. |
4 Copyright (C) 1995 Sun Microsystems, Inc. | 4 Copyright (C) 1995 Sun Microsystems, Inc. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
375 struct gcpro gcpro1, gcpro2, gcpro3; | 375 struct gcpro gcpro1, gcpro2, gcpro3; |
376 int speccount = specpdl_depth (), speccount2; | 376 int speccount = specpdl_depth (), speccount2; |
377 int first_frame_on_device = 0; | 377 int first_frame_on_device = 0; |
378 int first_frame_on_console = 0; | 378 int first_frame_on_console = 0; |
379 Lisp_Object besmirched_cons = Qnil; | 379 Lisp_Object besmirched_cons = Qnil; |
380 int frame_name_is_defaulted = 1; | |
380 | 381 |
381 d = decode_device (device); | 382 d = decode_device (device); |
382 XSETDEVICE (device, d); | 383 XSETDEVICE (device, d); |
383 | 384 |
384 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */ | 385 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */ |
394 props = nconc2 (props, make_sure_its_a_fresh_plist (Vdefault_frame_plist)); | 395 props = nconc2 (props, make_sure_its_a_fresh_plist (Vdefault_frame_plist)); |
395 Fcanonicalize_lax_plist (props, Qnil); | 396 Fcanonicalize_lax_plist (props, Qnil); |
396 | 397 |
397 name = Flax_plist_get (props, Qname, Qnil); | 398 name = Flax_plist_get (props, Qname, Qnil); |
398 if (!NILP (name)) | 399 if (!NILP (name)) |
399 CHECK_STRING (name); | 400 { |
401 CHECK_STRING (name); | |
402 frame_name_is_defaulted = 0; | |
403 } | |
400 else if (STRINGP (Vdefault_frame_name)) | 404 else if (STRINGP (Vdefault_frame_name)) |
401 name = Vdefault_frame_name; | 405 name = Vdefault_frame_name; |
402 else | 406 else |
403 name = build_string ("emacs"); | 407 name = build_string ("emacs"); |
404 | 408 |
410 XSETFRAME (frame, f); | 414 XSETFRAME (frame, f); |
411 | 415 |
412 specbind (Qframe_being_created, name); | 416 specbind (Qframe_being_created, name); |
413 f->name = name; | 417 f->name = name; |
414 | 418 |
415 FRAMEMETH (f, init_frame_1, (f, props)); | 419 FRAMEMETH (f, init_frame_1, (f, props, frame_name_is_defaulted)); |
416 | 420 |
417 minibuf = Flax_plist_get (props, Qminibuffer, Qunbound); | 421 minibuf = Flax_plist_get (props, Qminibuffer, Qunbound); |
418 if (UNBOUNDP (minibuf)) | 422 if (UNBOUNDP (minibuf)) |
419 { | 423 { |
420 /* If minibuf is unspecified, then look for a minibuffer X resource. */ | 424 /* If minibuf is unspecified, then look for a minibuffer X resource. */ |
507 /* Hallelujah, praise the lord. */ | 511 /* Hallelujah, praise the lord. */ |
508 f->init_finished = 1; | 512 f->init_finished = 1; |
509 | 513 |
510 XCDR (besmirched_cons) = Qunbound; | 514 XCDR (besmirched_cons) = Qunbound; |
511 | 515 |
512 unbind_to (speccount2, Qnil); | 516 unbind_to (speccount2); |
513 | 517 |
514 /* If this is the first frame on the device, make it the selected one. */ | 518 /* If this is the first frame on the device, make it the selected one. */ |
515 if (first_frame_on_device && NILP (DEVICE_SELECTED_FRAME (d))) | 519 if (first_frame_on_device && NILP (DEVICE_SELECTED_FRAME (d))) |
516 set_device_selected_frame (d, frame); | 520 set_device_selected_frame (d, frame); |
517 | 521 |
555 | 559 |
556 /* Initialize custom-specific stuff. */ | 560 /* Initialize custom-specific stuff. */ |
557 if (!UNBOUNDP (symbol_function (XSYMBOL (Qcustom_initialize_frame)))) | 561 if (!UNBOUNDP (symbol_function (XSYMBOL (Qcustom_initialize_frame)))) |
558 call1 (Qcustom_initialize_frame, frame); | 562 call1 (Qcustom_initialize_frame, frame); |
559 | 563 |
560 unbind_to (speccount, Qnil); | 564 unbind_to (speccount); |
561 | 565 |
562 UNGCPRO; | 566 UNGCPRO; |
563 return frame; | 567 return frame; |
564 } | 568 } |
565 | 569 |
592 if (CONSOLEP (cdf)) | 596 if (CONSOLEP (cdf)) |
593 cdf = CONSOLE_SELECTED_DEVICE (decode_console (cdf)); | 597 cdf = CONSOLE_SELECTED_DEVICE (decode_console (cdf)); |
594 if (DEVICEP (cdf)) | 598 if (DEVICEP (cdf)) |
595 cdf = DEVICE_SELECTED_FRAME (decode_device (cdf)); | 599 cdf = DEVICE_SELECTED_FRAME (decode_device (cdf)); |
596 return decode_frame (cdf); | 600 return decode_frame (cdf); |
597 } | |
598 | |
599 Lisp_Object | |
600 make_frame (struct frame *f) | |
601 { | |
602 Lisp_Object frame; | |
603 XSETFRAME (frame, f); | |
604 return frame; | |
605 } | 601 } |
606 | 602 |
607 | 603 |
608 /* | 604 /* |
609 * window size changes are held up during critical regions. Afterwards, | 605 * window size changes are held up during critical regions. Afterwards, |