tumashu / company-posframe

121 stars 24 forks source link

On macOS, the new lower-frame call causes Emacs to hide #43

Open aaronjensen opened 4 years ago

aaronjensen commented 4 years ago

This commit: https://github.com/tumashu/company-posframe/commit/4e8f2056fa71aa5749341d834226e3ec786cea63

Causes emacs to hide when the quickhelp is shown on macOS.

GNU Emacs 27.0.91 (build 2, x86_64-apple-darwin19.4.0, NS appkit-1894.40 Version 10.15.4 (Build 19E287)) of 2020-05-02

tumashu commented 4 years ago

why, macos emacs's bug?

aaronjensen commented 4 years ago

It's not actually the raise-frame, it's the lower-frame. My guess is that on macOS it lowers the entire application rather than just the one window (emacs frame).

aaronjensen commented 4 years ago

It's a child frame issue:

M-: (make-frame `((parent-frame . ,(window-frame))))
;; In new frame
M-: (lower-frame)

That causes it to lower both the parent and the child.

aaronjensen commented 4 years ago

This reproduces on emacs 28 master, so I'll report.

aaronjensen commented 4 years ago

Reported upstream: bug#41422 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41422

tumashu commented 4 years ago

Suggest send a mail in emacs-devel.

sergeyklay commented 3 years ago

Once I realized that because pitkali/pos-tip#11 / company-mode/company-quickhelp#42 make tooltips too ugly on macOS. So, I was forced to find alternatives. Now I see even worse result using this project. Sadly, default company doc behaviour is the only viable workaround for me now.

I'll leave a link here to help anyone looking for a discussion on this issue: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03253.html

aaronjensen commented 3 years ago

@sergeyklay I simply remove the lower-frame call in my local copy of company-posframe. I'm not even sure why it's there as everything seems to work without it. Perhaps a patch should be submitted with a var to disable the lower frame call that defaults to true on macOS?

tumashu commented 3 years ago

@aaronjensen maybe this is a good temp solution :-), I will disable lower-frame in macos

aaronjensen commented 3 years ago

@tumashu thank you for the fix.

It looks like it was fixed upstream as well, so it will be fixed in Emacs 28:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41422