* exwm.el (exwm--on-ClientMessage): Handle the case where a window is
hidden but not iconic. This code would previously error in some cases
because a buffer wouldn't have an active window even when it was not in
the iconic state, likely due to a focus race somewhere.
fixes#28
* exwm-systemtray.el (xcb:systemtray:-ClientMessage): Remove class.
(exwm-systemtray--init): Use `xcb:icccm:-ManagerSelection' instead of
`xcb:systemtray:-ClientMessage'.
* exwm-xsettings.el (exwm-xsettings--init): Use `xcb:icccm:-ManagerSelection'
instead of `xcb:xsettings:-ClientMessage'.
Combine both focus update timers into one and ignore windows in "no
focus" frames.
* exwm-input.el
(exwm-input--on-buffer-list-update):
Avoid focusing windows in frames with the `no-accept-focus` frame
property.
(exwm-input--update-focus-defer-timer):
Remove the duplicate timer.
(exwm-input--update-focus-defer):
Use a single `exwm-input--update-focus-timer`.
(exwm-input--update-focus-commit):
Read `exwm-input--update-focus-window` instead of taking a window
as a parameter (this is what lets us combine the timers).
(exwm-input--update-focus-commit):
Use a let-bind instead of unwind-protect.
(exwm-input--exit):
Remove references to `exwm-input--update-focus-defer-timer`.
Otherwise `default-directory' could be /home/user instead of /home/user/ as is
expected by Emacs.
* exwm-manage.el (exwm-manage--update-default-directory): Use
`file-name-as-directory'.
* exwm-manage.el (exwm-manage--update-default-directory):
define a function to update the default-directory of an X window based on it's CID.
(exwm-manage--manage-window):
call `exwm-manage--update-update-default-directory` on manage (fixes#12).
All this logic runs in the context of the EXWM buffer. If there are
concerns about the X windows associating with a different buffer while
we're still trying to manage it, we probably have bigger problems.
* exwm-manage.el (exwm-manage--manage-window): assume that the current
buffer doesn't change.
Users can use this to configure system-wide themes, icons, fonts, etc.
* exwm-xsettings.el: Implement the XSETTINGS protocol (fixes
https://github.com/ch11ng/exwm/issues/876)
These functions and variables have been marked as obsolete over five years ago.
* exwm-input.el (exwm-input-set-simulation-keys): Remove obsolete function.
* exwm-randr.el (exwm-randr--refresh, exwm-randr-workspace-output-plist): Remove
obsolete aliases.
This patch starts Emacs as a foreground daemon (so it can accurately be
killed) and terminates it by sending a signal (because
'server-force-delete' stops the local server, not the named server).
* exwm.el (exwm--server-timeout): The time to politely wait for the
subordinate server to exit before killing it.
(exwm--server-stop): Send SIGTERM to the subordinate process instead of
using 'server-force-delete'.
(exwm--server-eval-at): Prevent Emacs from forking so we can manage it
as a subprocess.
When any of these functions are called, Emacs expects to receive all
input events until they return. Unfortunately, there doesn't appear to
be a reliable way to detect that these functions are currently running
other than advising them.
* exwm-input.el (exwm-input--init): Advise low-level input reading
functions to bind 'exwm-input-line-mode-passthrough' to t when called.
(exwm-input--exit): Unadvise.
(exwm-input--call-with-passthrough): The advice.
(exwm-input--passthrough-functions): The functions we now advise.
* exwm-input.el (exwm-input--fake-last-command): Catch and report
all errors raised when invoking `pre-command-hook' and
`post-command-hook'.
Copyright-paperwork-exempt: yes
* exwm-workspace.el (exwm-workspace--update-workareas): Clone the
value of the `exwm-geometry' frame parameter before modifying it
for calculating workareas.
(exwm-workspace--update-workareas): Simplify `pcase' patterns.