* exwm-core.el (exwm-debug-log-time-function): New user option for
choosing the style of timestamps in debug logs.
(exwm-debug-log-uptime, exwm-debug-log-time): Possible candidates for
it.
(exwm--log): Use it.
* exwm-xim.el (exwm-xim--handle-forward-event-request): exwm-xim
enforces `input-method-use-echo-area' but this breaks some input
methods. This change clear garbage printed by such input methods.
* exwm.el (exwm--on-ClientMessage): Calling `kill-buffer' directly
from an event context won't work since the DestroyNotify event for a
WM_DELETE_WINDOW request won't be handled until the current event
context terminates.
* exwm-manage.el (exwm-manage--kill-buffer-query-function): Avoid
potential side effects with MapWindow.
* exwm-input.el (exwm-input--echo-area-timer): New variable storing
the timer used for detecting echo area messages.
(exwm-input--on-minibuffer-setup, exwm-input--on-minibuffer-exit)
(exwm-input--on-echo-area-dirty, exwm-input--on-echo-area-clear): New
functions for grabbing/releasing keyboard when minibuffer/echo becomes
active/inactive.
(exwm-input--init, exwm-input--exit): Register/Unregister them.
(exwm-input--grab-keyboard, exwm-input--release-keyboard): Validate
buffers.
* exwm-input.el (exwm-input--on-buffer-list-update): The way of
detecting a switch from a `*temp*' buffer does not always work.
Disable it until we find a better way.
* exwm-systemtray.el (exwm-systemtray--on-workspace-switch)
(exwm-systemtray--on-randr-refresh): Instead of retrieving the real
frame height, manually calculate it with workarea height and
menu-bar/tool-bar size.
* exwm-input.el (exwm-input--grab-global-prefix-keys)
(exwm-input--fake-key):
* exwm-xim.el (exwm-xim--handle-forward-event-request): X11 allows
multiple combinations of KEYSYM-MODIFIERS to generate a same
KEYSYM, thus the result of an Emacs event to KEYSYM-MODIFIERS
conversion is not necessarily unique. Previously the result of
`xcb:keysyms:event->keysym' is misused as the modifiers returned is
actually the ones should be consumed.
* exwm-workspace.el (exwm-workspace--original-handle-focus-in)
(exwm-workspace--original-handle-focus-out): Store the original
`handle-focus-{in,out}'.
(exwm-workspace-switch): Now that `handle-focus-{in,out}' has been
updated to call other stuffs like `after-focus-change-function', we
can no longer run `focus-{in,out}-hook' only.
* exwm-workspace.el (exwm-workspace--get-remove-frame-next-workspace):
New function automatically moves X window elsewhere before removing a
workspace; also returns the destination workspace.
(exwm-workspace--prompt-delete, exwm-workspace-delete)
(exwm-workspace--remove-frame-as-workspace): Use it.
* exwm.el (exwm--on-ClientMessage): Use it.
* exwm-input.el (exwm-input--last-enter-notify-position): New variable
storing last mouse position.
(exwm-input--on-EnterNotify): Avoid switching workspace when mouse
position is not changed (the event is a result of a workspace switch).
* exwm-xim.el (exwm-xim--handle-forward-event-request): Factored out
from `exwm-xim--on-request' to make auto commit work. With input
methods providing candidates the first candidate can be implicitly
selected if no further matching is possible. The last event would be
stored in `unread-command-events' (at least for `quail-input-method')
and should be reused by the input method.
(exwm-xim--on-request): Use it.
* exwm-randr.el (exwm-randr--compatibility-mode): Indicating whether
RandR 1.5 is supported by the server.
(exwm-randr--init): Set it.
(exwm-randr--get-monitor-alias): Split out from
exwm-randr--get-monitors for reuse.
(exwm-randr--get-outputs): New function for retrieving RandR 1.2
outputs when RandR 1.5 is not supported.
(exwm-randr-refresh): Call `exwm-randr--get-outputs' in compatibility
mode.
* exwm-core.el (exwm--get-client-event-mask): Renamed from
`exwm--client-event-mask' and used as a function.
* exwm-floating.el (exwm-floating--unset-floating):
* exwm-layout.el (exwm-layout--hide):
* exwm-manage.el (exwm-manage--manage-window): Use it.
* exwm-workspace.el (exwm-workspace--switch-map)
(exwm-workspace--init): Avoid initializing the keymap when loading.
(exwm-workspace--init-switch-map): Initialize
`exwm-workspace--switch-map' and also add extra keybindings when
`exwm-workspace-index-map' has been customized.
* exwm.el (exwm-replace): New user option for specifying whether to
replace existing WM.
(exwm-init): Use it.
(exwm--wmsn-acquire, exwm-init): Do not print warning message when
user gives up replacing.
* exwm-core.el (exwm--wmsn-replace): Remove dead code.
; The code is basically refactored from
; https://github.com/ch11ng/exim to get better maintenance.
* exwm-xim.el: New module making Emacs's builtin input methods usable
for interacting with X windows.
* exwm-core.el (exwm--intern-atom): New function for intern X11 atoms.
* exwm-input.el (exwm-input--init):
* exwm-manage.el (exwm-manage--init): Use it.
* exwm-input.el (exwm-input-simulation-keys): Original key only has
one option, so probably shouldn’t be a `choice` type; Move the
"User-defined" key value to the top, since that’s the one someone is
most likely to want).
* exwm-config.el (exwm-config-default): Only set custom vars if there
isn’t a saved value for them.
* exwm-layout.el (exwm-layout-auto-iconify): New user option to
specify whether to automatically iconify X windows.
(exwm-layout--auto-iconify): Automatically iconify floating X windows
when its main X window (if any) is iconified.
(exwm-layout--show, exwm-layout--hide): Use it.
* exwm-input.el (exwm-input--skip-buffer-list-update): New internal
variable for skipping the next 'buffer-list-update'.
(exwm-input--on-buffer-list-update): Skip when
`exwm-input--skip-buffer-list-update` is set.
* exwm-manage.el (exwm-manage--manage-window): Set
`exwm-input--skip-buffer-list-update` when creating/killing buffers.