Skip to content

Commit

Permalink
smart-move-frame-inside-screen: do not rely on window-system frame pa…
Browse files Browse the repository at this point in the history
…rameter

This parameter is only set for the first frame.
  • Loading branch information
davidswelt committed Jan 13, 2012
1 parent a7252e4 commit 71a5621
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions aquamacs/doc/latex/changelog.tex
Expand Up @@ -8,6 +8,7 @@ \subsection{Changes--- dev}
Suggested by Juan Jose Garcia Ripoll.
\item Text search (isearch) now works better when using one of the Emulate-Mac-Keyboard-Modes.
Reported by Thomas Strathmann.
\item Frames are now reliably moved inside the current display again when entering the minibuffer (and at other times).
\end{itemize}

\subsection{Changes--- 2.4}
Expand Down
6 changes: 3 additions & 3 deletions aquamacs/src/site-lisp/smart-frame-positioning.el
Expand Up @@ -722,7 +722,7 @@ Returns nil of parms is nil."
; (setq frame (selected-frame))
; (smart-move-minibuffer-inside-screen)
(defun smart-move-minibuffer-inside-screen (&optional frame)
(when (and (frame-parameter (or frame (selected-frame)) 'window-system)
(when (and (display-graphic-p frame)
(not (frame-parameter frame 'fullscreen)))
(unless
(smart-minibuffer-inside-screen-p frame)
Expand All @@ -740,7 +740,7 @@ boundaries.
The function will fail to do its job when the Dock is not displayed
on the main screen, i.e. where the menu is."
(interactive)
(when (frame-parameter (or frame (selected-frame)) 'window-system)
(when (display-graphic-p frame)
(let* ((frame (or frame (selected-frame)))
;; on some systems, we can retrieve the available pixel width with
;; non-standard methods.
Expand Down Expand Up @@ -838,4 +838,4 @@ on the main screen, i.e. where the menu is."
(smart-move-frame-inside-screen nil t))))


(provide 'smart-frame-positioning)
(provide 'smart-frame-positioning)

0 comments on commit 71a5621

Please sign in to comment.