tumashu / ivy-posframe

ivy-posframe is a ivy extension, which let ivy use posframe to show its candidate menu, ivy-posframe is a **GNU ELPA** package.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ivy posframe persists after toggle away

jonathanchu opened this issue · comments

Hello! First off, I love this package and thank you so much for your efforts in writing and maintaining this package!

The issue I'm hitting is when I invoke ivy-posframe, the window doesn't go away and persists. An example of this is to invoke find file in project, select file and hit "enter", toggle away from Emacs and then toggle back, and the ivy-posframe window is visible. I made a gif to hopefully show the issue clearly.

ivy-posframe-issue

Is there a way to make the window go away after selection? Perhaps I'm doing it wrong? The only way I found to make it go away is doing a mouse click outside of the ivy-posframe window.

My config looks like this:

(use-package ivy-posframe
  :ensure t
  :after ivy
  :diminish
  :config
  (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-top-center))
        ivy-posframe-height-alist '((t . 20))
        ivy-posframe-parameters '((internal-border-width . 10)))
  (setq ivy-posframe-width 70)
  (setq posframe-mouse-banish t)
  (ivy-posframe-mode +1))

Maybe it is a emacs mac's bug. I use linux, and seem to have no this problem.

@tumashu Hm ok, thanks for that info! I'll take a look and see if I can identify the issue here. Would you be able to give any helpful tips on where to start looking for the window frame not being killed after selection? I'm happy to submit a PR for this repo or posframe itself if I can get to the root cause.

posframe do not kill frame, just hide it for speed reason

we should find why hided frame showed unexpect

Thanks for the feedback on this issue @tumashu! I've narrowed down the issue. It is indeed the buggy childframe support on Mac OS X with the Emacs distro I was using.

For Mac OS X users, we should be using railwaycat's emacs-mac port:

$ brew tap railwaycat/emacsmacport
$ brew install emacs-mac

At this time, this port of emacs offers better integration with macOS and better childframe support. Perhaps this is a useful note I can add to the documentation?

Just a note that I'm using a different macOS-friendly version of emacs---emacs-head---and don't have this problem, though I use child-frame and org-roam.

Ah thanks, that's great to know. I didn't realize that. I guess it could just be the version I was using - emacs-plus.