ch11ng / exwm

Emacs X Window Manager
2.85k stars 134 forks source link

Focus follows mouse not working (again?) #544

Closed setzer22 closed 5 years ago

setzer22 commented 5 years ago

I seem to be experimenting an issue related to #340. However, I'm currently on 0.22, and the fix for that issuse was pushed by then.

I have set the following variables in my config:

(setq mouse-autoselect-window t
      focus-follows-mouse t)

At first, I did so after requiring exwm, and the behavior was just as described in #340. Focus-follows-mouse worked for regular emacs buffers, but didn't work at all for EXWM buffers.

However, after reading the issue, I realised I had to set their value before loading exwm. However, after doing so focus-follows-mouse doesn't work on any kind of buffer. I tried two different methods of setting the variables before exwm loads:

Please let me know if there's any way I can help debug this!

ch11ng commented 5 years ago

Perhaps it's a little bit tricky but you should put (setq mouse-autoselect-window t) before (require 'exwm), as described in here.

setzer22 commented 5 years ago

@ch11ng You are right, none of the methods I tried actually set the variables before exwm loaded. For other people with the same issue, the problem with the use-package macro was that I was setting the variables in the :config section, not the :init section (which is executed after the require).

Closing this, since it wasn't an issue at all!