Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool tip appears outside of emacs window #21

Open
natsumi opened this issue Nov 5, 2016 · 4 comments
Open

Tool tip appears outside of emacs window #21

natsumi opened this issue Nov 5, 2016 · 4 comments

Comments

@natsumi
Copy link

natsumi commented Nov 5, 2016

Image illustrates the problem:

tool-tip-pos

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 💻

  • 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
@swsnr
Copy link
Contributor

swsnr commented Nov 7, 2016

@natsumi Please check whether the issue also occurs in emacs -Q, to rule out that it's a Spacemacs problem.

@aguynamedben
Copy link

aguynamedben commented Jun 29, 2018

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

  1. Open Emacs.
  2. Move the window manually. flycheck-pos-tip works as expected (tooltip near the text).
  3. Hit a keyboard shortcut to move the window to the top left. flycheck-pos-tip's tooltip is still in the old position.
  4. 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.
  5. Hit a keyboard shortcut to move the window to the bottom right. flycheck-pos-tip's tooltip is still in the old position.
  6. 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.
  7. 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

image

Manually drag the window with the mouse... works as expected again

image

Throw window to the right using ShiftIt... tooptip now out of position

image

Drag window down a little bit with the mouse... tooltip now back in position

image

Emacs for Mac OS X 25.3
macOS 10.13.5
flycheck-pos-tip 20180610.915
pos-tip 20150318.813

@aguynamedben
Copy link

aguynamedben commented Jun 29, 2018

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

@aguynamedben
Copy link

Oooo I upgraded to Emacs for Mac OS X 26.1 and now it all works as expected! Yay magical bug fix in Emacs 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants