muffinmad / emacs-mini-frame

Show minibuffer in child frame on read-from-minibuffer
GNU General Public License v3.0
321 stars 20 forks source link

mini-frame move to the center of the screen #54

Closed tshu-w closed 2 years ago

tshu-w commented 2 years ago

The mini-frame first appear at the top of the frame, the it blink and move to the center of the screen. I use Emacs 28.0.60 and I try mini-frame the first time so I don't know whether this issue happen with older version of Emacs

Screen Shot 2021-10-17 at 22 35 19

GNU Emacs 28.0.60 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165)) of 2021-10-17

;;; emacs -nw -Q -l ~/.config/emacs/test.el

(setq package-archives '(("melpa"        . "https://melpa.org/packages/")
                         ("melpa-stable" . "https://stable.melpa.org/packages/")
                         ("org"          . "https://orgmode.org/elpa/")
                         ("gnu"          . "https://elpa.gnu.org/packages/"))
      package-user-dir (concat user-emacs-directory "elpa/"
                               (format "%d%s%d"
                                       emacs-major-version
                                       version-separator
                                       emacs-minor-version)))

;; initialize packages
(unless (bound-and-true-p package--initialized) ; To avoid warnings in 27
  (setq package-enable-at-startup nil)          ; To prevent initializing twice
  (package-initialize))

;; setup `use-package'
(unless (package-installed-p 'use-package)
  (when (not package-archive-contents)
    (package-refresh-contents))
  (package-install 'use-package))

(require 'use-package)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-package vertico
  :init
  (vertico-mode))

(use-package mini-frame
  :init
  (mini-frame-mode))
muffinmad commented 2 years ago

I can't reproduce this issue in recent Emacs 28 version. Do you use some applications that rearrange frames on OS level?

tshu-w commented 2 years ago

@muffinmad Oh sorry, I didn't realize it because I am using yabai and added the ability to auto-center windows that can't be resizable