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.
415 stars 26 forks source link

After moving frame to a new location (with the mouse), the ivy-posframe still shows up in the old location on the screen #115

Open mtwomey opened 3 years ago

mtwomey commented 3 years ago

As described in the title - I'm on emacs28, mac, head recipe.

It looks like this after moving the frame:

image

It's (partially) outside the emacs frame / window and still in the same location it was in before moving the frame.

I'm unclear on the proper way to fix this, or even if it's an ivy-posframe issue (rather than a straight posframe issue). I was able to work around this problem with after advice as follows:

  ;; Hack to workaround how the posframe doesn't show up in the right place after moving the frame with the mouse
  (advice-add 'ivy-posframe-cleanup :after (lambda (&rest _)
    (posframe-delete ivy-posframe-buffer)))

Thoughts on a proper fix?

tumashu commented 3 years ago

maybe it is the bug of child-frame feature in mac emacs :)

mtwomey commented 3 years ago

Yes , maybe - it's hard to tell where the bug is. One thing that I'm unclear on how ivy-posframe is supposed to handle things when the frame is moved on the screen. Can you clarify this part, e.g. how is the frame move handled?

tumashu commented 3 years ago

when frame move, posframe should move too, it is child-frame's feature.