Skip to content

Commit

Permalink
fixed a bug in maximizing windows
Browse files Browse the repository at this point in the history
  • Loading branch information
berndl committed Jun 21, 2009
1 parent 1517f1a commit d6b17a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
14 changes: 7 additions & 7 deletions ecb-layout.el
Expand Up @@ -350,7 +350,7 @@ layout with `ecb-redraw-layout'"
:set (function (lambda (symbol value) :set (function (lambda (symbol value)
;; Emacs < 22 has some bugs concerning `windows-size-fixed' ;; Emacs < 22 has some bugs concerning `windows-size-fixed'
;; so we must disable window-fixing. ;; so we must disable window-fixing.
(and (not ecb-running-version-22) (ecb-set-window-size-fixed nil)) (and (not ecb-running-gnu-emacs-version-22) (ecb-set-window-size-fixed nil))
(set symbol value) (set symbol value)
;; we must check this because otherwise the layout would be ;; we must check this because otherwise the layout would be
;; drawn if we have changed the initial value regardless if ;; drawn if we have changed the initial value regardless if
Expand Down Expand Up @@ -415,7 +415,7 @@ This option takes only effect if `ecb-compile-window-height' is not nil!"
:set (function (lambda (symbol value) :set (function (lambda (symbol value)
;; Emacs < 22 has some bugs concerning `windows-size-fixed' ;; Emacs < 22 has some bugs concerning `windows-size-fixed'
;; so we must disable window-fixing. ;; so we must disable window-fixing.
(and (not ecb-running-version-22) (ecb-set-window-size-fixed nil)) (and (not ecb-running-gnu-emacs-version-22) (ecb-set-window-size-fixed nil))
(set symbol value) (set symbol value)
;; we must check this because otherwise the layout would be ;; we must check this because otherwise the layout would be
;; drawn if we have changed the initial value regardless if ;; drawn if we have changed the initial value regardless if
Expand Down Expand Up @@ -779,7 +779,7 @@ then set always nil!"
(dolist (w l) (dolist (w l)
(save-excursion (save-excursion
(set-buffer (window-buffer w)) (set-buffer (window-buffer w))
(setq window-size-fixed (if (and (not ecb-running-version-22) (setq window-size-fixed (if (and (not ecb-running-gnu-emacs-version-22)
ecb-compile-window-height) ecb-compile-window-height)
nil nil
fix))))))) fix)))))))
Expand Down Expand Up @@ -2843,7 +2843,7 @@ some special tasks:
;; In the meanwhile we allow automatic maximizing only when ;; In the meanwhile we allow automatic maximizing only when
;; `ecb-tree-mouse-action-trigger' is 'button-press! ;; `ecb-tree-mouse-action-trigger' is 'button-press!
(or ecb-running-xemacs (or ecb-running-xemacs
ecb-running-version-22 ecb-running-gnu-emacs-version-22
(equal ecb-tree-mouse-action-trigger 'button-press)) (equal ecb-tree-mouse-action-trigger 'button-press))
(equal (selected-frame) ecb-frame) (equal (selected-frame) ecb-frame)
(= (minibuffer-depth) 0)) (= (minibuffer-depth) 0))
Expand Down Expand Up @@ -3165,7 +3165,7 @@ If called for other frames it works like the original version."
;; emacs 23 splits automatically when window-size allows ;; emacs 23 splits automatically when window-size allows
;; this (see split-width-threshold and ;; this (see split-width-threshold and
;; split-height-threshold)... ;; split-height-threshold)...
(when (and (not ecb-running-version-23) (when (and (not ecb-running-gnu-emacs-version-23)
(not (ecb-windows-all-hidden)) (not (ecb-windows-all-hidden))
(not (ecb-layout-top-p)) (not (ecb-layout-top-p))
pop-up-windows pop-up-windows
Expand Down Expand Up @@ -4177,7 +4177,7 @@ macro `ecb-with-ecb-advice' instead if you need this adviced version of
(if (and ecb-minor-mode (if (and ecb-minor-mode
(equal (selected-frame) ecb-frame) (equal (selected-frame) ecb-frame)
(not (ecb-windows-all-hidden))) (not (ecb-windows-all-hidden)))
(if ecb-running-version-22 (if ecb-running-gnu-emacs-version-22
;; Emacs 22 has reimplemented balance-windows so it is not longer based on ;; Emacs 22 has reimplemented balance-windows so it is not longer based on
;; walk-windows but uses a completely new mechanism based on a ;; walk-windows but uses a completely new mechanism based on a
;; c-level-function `window-tree'! Therefore we have to use another ;; c-level-function `window-tree'! Therefore we have to use another
Expand Down Expand Up @@ -4463,7 +4463,7 @@ will be selected also after."
(when (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-buffer-name) (when (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-buffer-name)
(ecb-redraw-layout-full (ecb-redraw-layout-full
t ;; no buffer synchronisation! t ;; no buffer synchronisation!
(ecb-ecb-buffer-registry-get-set-fcn ecb-methods-buffer-name)) (ecb-ecb-buffer-registry-get-set-fcn ecb-buffer-name))
(if compwin-hidden (ecb-toggle-compile-window -1)) (if compwin-hidden (ecb-toggle-compile-window -1))
(setq ecb-current-maximized-ecb-buffer-name ecb-buffer-name) (setq ecb-current-maximized-ecb-buffer-name ecb-buffer-name)
;; point is now in the edit-buffer so maybe we have to move point to the ;; point is now in the edit-buffer so maybe we have to move point to the
Expand Down
17 changes: 9 additions & 8 deletions ecb-util.el
Expand Up @@ -97,21 +97,22 @@
;;; ----- Some constants ----------------------------------- ;;; ----- Some constants -----------------------------------


;;;###autoload ;;;###autoload
;;(defconst ecb-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
(defconst ecb-running-xemacs (featurep 'xemacs)) (defconst ecb-running-xemacs (featurep 'xemacs))


(defconst ecb-running-gnu-emacs (not ecb-running-xemacs))

(defconst ecb-running-unsupported-emacs (condition-case nil (defconst ecb-running-unsupported-emacs (condition-case nil
(<= emacs-major-version 20) (<= emacs-major-version 20)
(error t)) (error t))
"True if running XEmacs or Emacs < 21.") "True if running XEmacs or Gnu Emacs < 21.")


(defconst ecb-running-version-22 (and (not ecb-running-unsupported-emacs) (defconst ecb-running-gnu-emacs-version-22 (and ecb-running-gnu-emacs
(>= emacs-major-version 22)) (>= emacs-major-version 22))
"True if running \(X)Emacs >= version 22") "True if running Gnu Emacs >= version 22")


(defconst ecb-running-version-23 (and (not ecb-running-unsupported-emacs) (defconst ecb-running-gnu-emacs-version-23 (and ecb-running-gnu-emacs
(>= emacs-major-version 23)) (>= emacs-major-version 23))
"True if running \(X)Emacs >= version 23") "True if running Gnu Emacs >= version 23")


(defconst ecb-temp-dir (defconst ecb-temp-dir
(file-name-as-directory (file-name-as-directory
Expand Down

0 comments on commit d6b17a1

Please sign in to comment.