emacs-exwm / exwm

Emacs X Window Manager
https://elpa.gnu.org/packages/exwm.html
GNU General Public License v3.0
268 stars 13 forks source link

Setting _NET_ACTIVE_WINDOW to emacs when non-EXWM buffer in focus #77

Open ErikPrantare opened 2 months ago

ErikPrantare commented 2 months ago

I use a program (talon voice) that gets information about the currently active window by reading its title. It gets the active window through reading _NET_ACTIVE_WINDOW. In EXWM, this is only set when focusing X windows. Is it possible to have it be set to the emacs window whenever a regular buffer is in focus?

Stebalien commented 2 months ago

Makes sense. We'd have to set it to the workspace frame instead of xcb:Window:None here:

https://github.com/emacs-exwm/exwm/blob/f453664bd6c509a68da6e85242fe941cc64c7b5d/exwm-input.el#L395

We'd also need to make sure to update it when switching workspaces.