-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Powerline confused about frame focus #2545
Comments
I have noticed similar behavior. What I noticed with i3wm is due to the container nature of i3. When you move the mouse I believe what happens is the container gets focused, not the window. I have verified this by enabling a "focus child" keybinding in my i3 config, say by uncommenting the following line from the default config:
After I move the mouse over the other frame, I hit Does this explain the behavior you're seeing? |
Yes that would explain it. Have you found any way around it? |
Well, you can see in my screencast that the the current line gets highlighted, and also the cursor changes to its focused look. So actually no, it doesn't explain it :) It's just the powerline that doesn't do the right thing. |
I guess I haven't investigated it further since I discovered that focusing the child would get around it. I need to figure out what event causes Powerline to change appearance and see why i3wm isn't sending it. |
What is weird is that the powerline behavior is exactly inversed, empty when focused and full when not focused. Maybe digging |
@felipe-barros make sure you don't have custom-variables regarding theme faces in your .spacemacs |
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ahs-case-fold-search nil)
'(ahs-default-range (quote ahs-range-whole-buffer))
'(ahs-idle-interval 0.25)
'(ahs-idle-timer 0 t)
'(ahs-inhibit-face-list nil)
'(ring-bell-function (quote ignore) t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(company-tooltip-common ((t (:inherit company-tooltip :weight bold :underline nil))))
'(company-tooltip-common-selection ((t (:inherit company-tooltip-selection :weight bold :underline nil))))) Besides this at the end (and I still don't understand this auto-generated code), there is nothing else changing theme faces. |
I have faced that bug too and tried another wms: xmonad, wmii and awesome. But bug still present. But I have small workaround: I'm removing not from 'powerline-set-selected-window' (in powerline package, file poweline.el) and all windows become grey despite focus. |
Also, I noticed that if you open some window (for example type and open helm window), powerline focus move to the right window. |
So, also tried fluxbox, and behavior was exactly the same. Then I put some debug output and what I've got: Setting (powerline-selected-window) is done by calling (focus-in-hook) and (focus-out-hook). Therein, in handlers, (powerline-selected-window) set to the (frame-selected-window). BUT the frame-selected-window is pointed to the wrong window, the window that was previously selected. If then you execute (print (frame-selected-window)) you will get the correct answer. So, the problem is deeper in core of emacs, in code that handling focusing events and setting (frame-selected-window). For some reason focus hooks raising earlier then setting frame-selected-window. Moreover, by the documentation (frame-selected-window) is pointing to the last frame that gains input focus. So, if you move focus from the emacs at all to some other window, the (powerline-selected-window) will be not nill and one of the emacs window will have a colored modeline, despite the real focus. May be this questions should be asked to the powerline developers? |
And I discovered more convenient workaround with powerline: i make the powerline-selected-window-active always returning true, and unselected windows disappear at all, all windows are like a selected now. Just rewrite the powerline-selected-window-active elpa/powerline-x/powerline.el as
|
I can confirm this happens in xmonad. |
Still happening with |
There is new pull request to powerline appeared and merged to powerline not so far ago. Check it: milkypostman/powerline#111. It's solves this issue for me. But, it introduces a new bug. Check here for explanation and fix: zakame/.emacs.d@818b5e3 Anyway, I believe this issue can be closed after @skrat confirmation. |
I can confirm that something seems to have fixed this, at least. :-) |
Closing since this appears to be fixed, and no reports to the contrary. |
Look at this http://i.imgur.com/ke3t4Gc.gif
It's from i3-wm, I have multiple frames open, and the powerline doesn't reflect correctly whichever frame is focused.
The text was updated successfully, but these errors were encountered: