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 not disappearing #6

Closed
StreakyCobra opened this issue Nov 9, 2015 · 19 comments
Closed

Tool-tip not disappearing #6

StreakyCobra opened this issue Nov 9, 2015 · 19 comments
Labels

Comments

@StreakyCobra
Copy link

With the last version, freshly taken from MELPA (20151109.1056), the tool-tip take ages to disappear. It get updated quickly once on a new error (position and text), but even switching to another windows (like firefox) or changing the workspace (in i3) don't close it.

This issue was confirmed by @TheBB, so it shouldn't be config-specific.

@StreakyCobra StreakyCobra changed the title Tool-tip timeout too long Tool-tip not disappearing Nov 9, 2015
@zeroDivisible
Copy link

Just to add to the above: after setting

(setq
  flycheck-pos-tip-timeout 10)

tool-tip will disappear after 10 seconds.

However, even with the above, it will still not disappear:

  • after Emacs loses focus
  • after moving a cursor outside of the highlighted part of the code.

@synic
Copy link

synic commented Nov 10, 2015

Yeah, this is really annoying. Going to have to remove this package until it's fixed, because the tooltip popup stays in the way of my code.

@swsnr swsnr closed this as completed in a418150 Nov 11, 2015
@swsnr
Copy link
Contributor

swsnr commented Nov 11, 2015

@StreakyCobra I've turned this library into a global minor mode (flycheck-pos-tip-mode), which adds a hook to hide the tooltip after the next command. Also, the tooltip automatically hides after five seconds now.

Please update and try whether that's better.

@StreakyCobra
Copy link
Author

I can confirm that the 5 seconds timer works – the 60 seconds before was also working, just a little bit too long :-) – but the tooltip gets closed only by the timer. I tried to:

  • Change line
  • Insert text
  • Open a new window
  • Change buffer
  • Change the focus to firefox

And it stays for the 5 seconds in any case.

Is there anything else I should do to make it work, as it's a global minor mode now? Maybe it's a spacemacs problem?


I just updated my packages from melpa:

(define-package "flycheck-pos-tip" "20151111.131" "Flycheck errors display in tooltip" '((dash "2.12") (flycheck "0.18") (pos-tip "0.4.6")) :url "https://github.com/flycheck/flycheck-pos-tip" :keywords '("tools" "convenience"))

I'm sure it's the last version as your last change is included (f2459b4)

@swsnr
Copy link
Contributor

swsnr commented Nov 11, 2015

@StreakyCobra Did you change your configuration to enable the new minor mode?

@swsnr swsnr added the bug label Nov 11, 2015
@StreakyCobra
Copy link
Author

Sorry, I was assuming it was enabled by default, my bad. Indeed it works better, it escapes on actions within emacs, but not when changing the focus (i.e. changing to firefox, to a terminal, etc…)

If I am the only one encountering this problem, it may be something wrong on my side. I'm using i3-wm by the way.

@swsnr
Copy link
Contributor

swsnr commented Nov 11, 2015

@StreakyCobra Does it matter that the tooltip stays when switching focus? I mean, if you switch away from Emacs, why would care for the error tooltip?

@StreakyCobra
Copy link
Author

The problem is the tooltip stays in front of firefox, even if emacs is behind it.

It's why I am saying it could be related to my WM.

@joehillen
Copy link

I just reproduced @StreakyCobra's issue. I am also on i3. I'm worried this could be an issue with Emacs' tooltip implementation and not this plugin.

swsnr pushed a commit that referenced this issue Nov 11, 2015
Needs Emacs 24.4 to work.

See GH-6
@swsnr
Copy link
Contributor

swsnr commented Nov 11, 2015

@StreakyCobra Indeed, I can't reproduce that behaviour on OS X. Anyhow, I've added code to hide the tooltip when Emacs looses focus, but you'll need at least Emacs 24.4 for that to work, as the corresponding hook is not available on earlier versions.

@StreakyCobra
Copy link
Author

👍 Many thanks, I'll try it once updated on melpa and give a feedback here.

@joehillen
Copy link

Is it supposed to take ~5 seconds for the tooltip to appear as well?

@swsnr
Copy link
Contributor

swsnr commented Nov 11, 2015

@joehillen The tooltip appears after whatever you set flycheck-display-errors-delay to.

@joehillen
Copy link

flycheck-display-errors-delay is a variable defined in `flycheck.el'.
Its value is 0.9

Hmm, maybe it's a haskell-mode issue.

@StreakyCobra
Copy link
Author

@lunaryorn It works now 👍 Thx for your help. On last detail: the focus-out-hook doesn't cancel the timer, so if we go on an error just before changing the focus, the the tip appears after the delay over the other window. But it's a minor annoyance :-)

swsnr added a commit to flycheck/flycheck that referenced this issue Nov 13, 2015
Show error at point again if Emacs gets the focus, and cancel error
display if Emacs looses focus, as there’s no need to show an error that
the user won’t even see.

See flycheck/flycheck-pos-tip#6
swsnr added a commit to flycheck/flycheck that referenced this issue Nov 13, 2015
Show error at point again if Emacs gets the focus, and cancel error
display if Emacs looses focus, as there’s no need to show an error that
the user won’t even see.

See flycheck/flycheck-pos-tip#6
@swsnr
Copy link
Contributor

swsnr commented Nov 13, 2015

@StreakyCobra The latest master of Flycheck now cancels error display when Emacs looses focus, and re-starts it when Emacs gets the focus again. That should properly hide and show the tooltip upon focus changes. Again, focus hooks are 24.4 and upwards only, so you'll need to update Emacs if you're still on 24.3 or earlier.

@StreakyCobra
Copy link
Author

👍 I'll try it once in melpa, thx

@StreakyCobra
Copy link
Author

@lunaryorn It works perfectly now! Many thanks.

@duianto
Copy link

duianto commented Aug 26, 2020

This issue seems to have reappeared.

The tooltip remains visible when switching to another application on top of Emacs.

NixOS

  • Emacs

VirtualBoxVM_2020-08-26_08-17-34

  • Switched (Alt + Tab) to Firefox

VirtualBoxVM_2020-08-26_08-17-51

flycheck-pos-tip-20200516.1600
GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.21)
NixOS 20.03

Windows

  • Emacs

2020-08-26_08-35-33

  • Switched (Alt + Tab) to Chrome

2020-08-26_08-34-25

flycheck-pos-tip-20200516.1600
GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
Windows 1903

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

No branches or pull requests

6 participants