flycheck-pos-tip
flycheck-pos-tip copied to clipboard
Tool tip appears outside of emacs window
Image illustrates the problem:
The tool tip never appears where the cursor is and instead appears outside of the emacs window at the edge of my monitor screen.
System Info :computer:
- OS: darwin
- Emacs: 25.1.1
- Spacemacs: 0.200.5
- Spacemacs branch: master (rev. 664ba6a)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
(helm emacs-lisp
(colors :variables colors-enable-nyan-cat-progress-bar t)
themes-megapack
(org :variables org-enable-github-support t)
elixir erlang html javascript markdown nginx python
(ruby :variables ruby-enable-enh-ruby-mode t ruby-version-manager 'rbenv ruby-test-runner 'rspec)
ruby-on-rails yaml vimscript auto-completion gtags
(syntax-checking :variables syntax-checking-use-original-bitmaps t)
git github version-control)
- System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
@natsumi Please check whether the issue also occurs in emacs -Q, to rule out that it's a Spacemacs problem.
I also have this problem using Emacs for OS X. I've found that the problem happens when I use ShiftIt and don't subsequently reposition the Emacs window by clicking and dragging it.
General Pattern
- Open Emacs.
- Move the window manually. flycheck-pos-tip works as expected (tooltip near the text).
- Hit a keyboard shortcut to move the window to the top left. flycheck-pos-tip's tooltip is still in the old position.
- Drag the Emacs window just a little bit. flycheck-pos-tip appears to get a callback that updates the window position, and the problem is fixed.
- Hit a keyboard shortcut to move the window to the bottom right. flycheck-pos-tip's tooltip is still in the old position.
- Drag the Emacs window just a little bit. flycheck-pos-tip appears to get a callback that updates the window position, and the problem is fixed.
- And so on...
It seems that manually dragging the window updates flycheck-pos-tip.
The painful part is that my Emacs config uses M-x toggle-frame-maximized
to fullscreen Emacs. This similarly "magic" repositioning of the window causes the same problem. So I have to barely click and barely drag the window a tiny bit, then the problem is fixed.
It seems that flycheck-pos-tip isn't tuned into macOS "window changed position" callback as good as it could be. Manually repositioning the window updates the tooltip position, but when using keyboard shortcuts or toggle-frame-maximized to reposition Emacs, flycheck-pos-tip doesn't get the updated position, forcing you to manually reposition the window.
Screenshots
Manually drag the window with the mouse... works as expected
Manually drag the window with the mouse... works as expected again
Throw window to the right using ShiftIt... tooptip now out of position
Drag window down a little bit with the mouse... tooltip now back in position
Emacs for Mac OS X 25.3 macOS 10.13.5 flycheck-pos-tip 20180610.915 pos-tip 20150318.813
It looks like this uses the pos-tip package... maybe it's a bug in there? More comments here: https://www.emacswiki.org/emacs/PosTip
Oooo I upgraded to Emacs for Mac OS X 26.1 and now it all works as expected! Yay magical bug fix in Emacs 👏