Move call to MAYBE-SELECT-BUFFER-LAYOUT outside of WITHOUT-INTERRUPTS.
authorChris Hanson <org/chris-hanson/cph>
Thu, 26 Oct 2000 05:06:04 +0000 (05:06 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 26 Oct 2000 05:06:04 +0000 (05:06 +0000)
Also call MAYBE-SELECT-BUFFER-LAYOUT from MAKE-SCREEN.

v7/src/edwin/curren.scm

index 727ab6c4aa5db39add97d2914dce03f5e9e37933..9188b0e2aaccbfdc0a56b198382e4c6dffb99b00 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: curren.scm,v 1.133 2000/10/26 04:47:56 cph Exp $
+;;; $Id: curren.scm,v 1.134 2000/10/26 05:06:04 cph Exp $
 ;;;
 ;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
 ;;;
   (let ((display-type (current-display-type)))
     (if (not (display-type/multiple-screens? display-type))
        (error "display doesn't support multiple screens" display-type))
-    (without-interrupts
-     (lambda ()
-       (let ((screen (display-type/make-screen display-type make-screen-args)))
-        (initialize-screen-root-window! screen
-                                        (editor-bufferset current-editor)
-                                        buffer)
-        (set-editor-screens! current-editor
-                             (append! (editor-screens current-editor)
-                                      (list screen)))
-        (event-distributor/invoke!
-         (variable-default-value (ref-variable-object frame-creation-hook))
-         screen)
-        (update-screen! screen #f)
-        screen)))))
+    (let ((screen
+          (without-interrupts
+           (lambda ()
+             (let ((screen
+                    (display-type/make-screen display-type make-screen-args)))
+               (initialize-screen-root-window!
+                screen
+                (editor-bufferset current-editor)
+                buffer)
+               (set-editor-screens! current-editor
+                                    (append! (editor-screens current-editor)
+                                             (list screen)))
+               (event-distributor/invoke!
+                (ref-variable frame-creation-hook #f)
+                screen)
+               (update-screen! screen #f)
+               screen)))))
+      (maybe-select-buffer-layout (screen-window0 screen) buffer)
+      screen)))
 
 (define-variable frame-creation-hook
   "An event distributor that is invoked when a frame is created.
@@ -469,8 +474,8 @@ The frame is guaranteed to be deselected at that time."
               (change-selected-buffer window buffer record?
                 (lambda ()
                   (set-window-buffer! window buffer)))
-              (set-window-buffer! window buffer))
-          (maybe-select-buffer-layout window buffer))))))
+              (set-window-buffer! window buffer))))))
+  (maybe-select-buffer-layout window buffer))
 
 (define (change-selected-buffer window buffer record? selection-thunk)
   (change-local-bindings! (selected-buffer) buffer selection-thunk)