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

Flycheck popup shows up misplaced and with wrong rendering #16

Closed
letheed opened this issue Jan 21, 2016 · 6 comments
Closed

Flycheck popup shows up misplaced and with wrong rendering #16

letheed opened this issue Jan 21, 2016 · 6 comments
Labels

Comments

@letheed
Copy link

letheed commented Jan 21, 2016

The pop up always appears in the left half of the screen, vertically centred on the error. It's not using the theme colours either. I'm using emacs 24.5.1 with spacemacs configuration on Ubuntu 15.10.
I'm not sure if pos-tip is at fault here or something else. Spacemacs ? but I haven't seen anyone with the same issue in their tracker. I'll post my config if you need. (I'm kind of fishing here :))

pos-tip

@swsnr
Copy link
Contributor

swsnr commented Jan 22, 2016

@letheed I don't know where that comes from. I've seen occasional misplacement on OS X, but nothing that bad or that consistent.

As for color themes, that's out of our control. Internally, pos-tip uses Emacs' X tooltips, and whether these are themed or not very much depends on Emacs' build settings and probably also on the environment it runs in. I suspect that normal GTK+ tooltips would be themed, but Unity probably overrides these with its own tooltips, hence also overriding any custom themes for tooltips on Emacs' side.

@oxyum
Copy link

oxyum commented Jan 22, 2016

I'm also affected by this bug:

My configuration:

Ubuntu 14.04,
2 monitors, Intel video, Xinerama and XMonad.
emacs-25.1.50.2
spacemacs-0.105.9

I tested different popup and emacs positions and looks like popup require coordinates corrections to position of emacs window top left corner.

Following diff fixes problem, but I doesn't know why you manually recalculate frame position, so I can't say what was broken by that "fix".

--- flycheck-pos-tip.el.orig    2016-01-18 15:30:16.000000000 +0300
+++ flycheck-pos-tip.el 2016-01-22 17:27:45.951630640 +0300
@@ -72,7 +72,7 @@
               (edges (window-pixel-edges))
               (line-height (car (window-line-height))))
           (pos-tip-show message nil nil nil flycheck-pos-tip-timeout
-                        nil (cons (car edges) (cadr edges))
+                        nil nil
                         ;; Add a little offset to the tooltip to move it away
                         ;; from the corresponding text in the buffer.  We
                         ;; explicitly take the line height into account because

@swsnr
Copy link
Contributor

swsnr commented Jan 22, 2016

@oxyum Thank you for this information. Actually this change was an attempt to work around another bug, namely #15, but since it apparently introduced a regression, I have reverted the offending commit.

@oxyum @letheed Please update after the next MELPA build, and test whether the issue is gone.

Thank you very much, and sorry for the hassle. pos-tip is a mess, and I'm really fishing in the mud when trying to fix issues with it 😞

@letheed
Copy link
Author

letheed commented Jan 22, 2016

@lunaryorn @oxyum Thanks a lot for the fix ! Position is back to normal. The rendering is capricious, sometimes it works and sometimes not, but it does not matter that much.
@oxyum Not at all, flycheck really is a huge help in my workflow. Saving me from having to switch to the terminal, run build commands, crawl through and decipher lines of warnings and errors, pick the possible line/row among all those printed and switching back to the code, hopefully with the right location. It works especially well with Rust (aside from the multiple bin/lib issue) given the very nature of Rust, so thank you very much for your efforts. 👍

@swsnr
Copy link
Contributor

swsnr commented Jan 23, 2016

@letheed Thank you very much for your kind words 😊

@oxyum
Copy link

oxyum commented Jan 25, 2016

I tested fixed package on my work box and it works fine. Thanks.

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

3 participants