* exwm-input.el (exwm-input--on-KeyPress-line-mode)
(exwm-input--on-KeyPress-char-mode): Force events to be added to
`this-command-keys'.
(exwm-input-send-next-key): The read event can now be (t . EVENT).
* exwm-input.el (exwm-input-set-local-simulation-keys): New function for
setting buffer-local simulation keys.
(exwm-input--local-simulation-keys): New internal variable.
(exwm-input--update-simulation-prefix-keys): Modify either
`exwm-mode-map' or the local keymap accordingly.
* exwm-core.el (exwm--mwm-hints): Removed.
(exwm--mwm-hints-decorations): New buffer-local variable for
indicating whether the X window should have decorations.
* exwm-floating.el (exwm-floating--set-floating): Hide the mode-line
of undecorated floating X windows by default.
* exwm-manage.el (exwm-manage--update-mwm-hints):
Set exwm--mwm-hints-decorations;
(exwm-manage--manage-window): Manage an undecorated X window if its
input model is not 'No Input' or 'Globally Active'.
* exwm-floating.el (exwm-floating--exit):
* exwm-input.el (exwm-input--exit):
* exwm-layout.el (exwm-layout--exit):
* exwm-manage.el (exwm-manage--exit):
* exwm-randr.el (exwm-randr--exit):
* exwm-systemtray.el (exwm-systemtray--exit):
* exwm-workspace.el (exwm-workspace--exit):
New functions for cleanup each module.
* exwm-input.el (exwm-input--on-pre-command, exwm-input--on-post-command)
(exwm-input--init): Name lambda functions.
* exwm-layout.el (exwm-layout--timer, exwm-layout--init): Save timer.
* exwm-randr.el (exwm-randr-enable): Register the cleanup function.
* exwm-systemtray.el (exwm-systemtray--init): Force refresh atoms in XEMBED
and system tray protocols.
(exwm-systemtray-enable): Register the cleanup function.
* exwm-workspace.el (exwm-workspace--client): Save the server process.
(exwm-workspace--confirm-kill-emacs): Add emacsclient-specific
cleanup codes.
(exwm-workspace--timer): Save the timer.
(exwm-workspace--init): Save the server process and timer;
fix problems with emacsclient frames.
* exwm.el (exwm-init): Always select the newly created frame;
force refresh ICCCM & EWMH atoms.
(exwm-exit-hook): New hook for holding cleanup codes.
(exwm--exit): Run `exwm-exit-hook', execute cleanup codes for
each module and reset the environment.
* exwm-systemtray.el (exwm-systemtray--init): Send a client message to
announce the manager selection.
(xcb:systemtray:-ClientMessage): The client message.
* exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init):
Handle unexpected frame switch in `focus-in-hook'.
* exwm-floating.el (exwm-floating--set-floating): If the absolute position
is (0, 0) then the relative position is also the same.
* exwm-layout.el (exwm-layout--other-buffer-exclude-exwm-mode-buffers)
(exwm-layout--other-buffer-exclude-buffers): New variables.
(exwm-layout--other-buffer-predicate): Allow excluding EXWM
buffers or buffers from a given set.
(exwm-layout--refresh): Replace EXWM buffers with sensible buffers
depending on the situation. When in non-workspace/non-floating
frames, with some non-EXWM buffer; when the EXWM buffer is
displayed elsewhere, some buffer previously displayed in that
window (making sure it has been recently covered).
* exwm-layout.el (exwm-layout--other-buffer-predicate): New
function to be set as `buffer-predicate' frame parameter.
* exwm-workspace.el (exwm-workspace--init): Use above function on
workspace frames.
When clicking a mode-line of other window to switch the EXWM input
mode, `window-buffer' does not return the window whose mode-line has
been clicked, but the current one. This change ensures that the right
window has its input mode and mode-line updated.
* exwm-input.el (exwm-input--update-mode-line): Factor out setting
`mode-line-process'.
(exwm-input--grab-keyboard, exwm-input--release-keyboard)
(exwm-input-grab-keyboard, exwm-input-release-keyboard): Make sure
the buffer of the window being clicked has its input mode updated.
* exwm-manage.el (exwm-manage--manage-window): Do not manage
undecorated floating X windows (set in _MOTIF_WM_HINTS).
* exwm-floating.el (exwm-floating--start-moveresize)
(exwm-floating--stop-moveresize, exwm-floating--do-moveresize):
Allow moving/resizing undecorated X windows with _NET_WM_MOVERESIZE
client message.
* exwm-manage.el (exwm-manage--kill-buffer-query-function): Handle buffer
change.
* exwm-workspace.el (exwm-workspace--show-minibuffer): Revert the change
made in 93e42136 (the problem has not been fully resolved).
* exwm-input.el (exwm-input--grab-keyboard, exwm-input--release-keyboard):
Grab keys on X windows instead to prevent unexpected input focus changes.
* exwm-workspace.el (exwm-workspace--show-minibuffer): The workaround for
cursor flickering issue is no more needed.
* exwm-core.el (exwm-mode-map): Add a new key to hide floating X windows.
* exwm-floating.el (exwm-floating-hide): New command to hide a floating X
window.
* exwm-workspace.el: Fix a compile warning.
* exwm-workspace.el (exwm-workspace-move-window): Select the moved floating
X window. Update the 'exwm-selected-window' frame parameter.
(exwm-workspace-switch): Check 'exwm-selected-window' for dead windows.
(exwm-workspace-switch-to-buffer): Allow non-interactive call.
* exwm-systemtray.el (exwm-systemtray-height): The value is not available
when emacsclient has just loaded the library (and it crashes emacsclient).
* exwm-workspace.el (exwm-workspace--init): Set `default-minibuffer-frame'
later to prevent it from being modified when using emacsclient.
* exwm-floating.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el: Use `exwm-workspace--minibuffer-own-frame-p' instead of the raw
variable.
* exwm-floating.el (exwm-floating--set-floating): Always create floating X
windows on current workspace.
* exwm-workspace.el (exwm-workspace-switch): Restore selected floating
frames.
* exwm-workspace.el (exwm-workspace-move-window): Restore the position of
floating X windows. Recreate floating frames when using fixed minibuffer.
Restack tiling X windows.
* exwm-config.el (exwm-config--ido-buffer-window-other-frame)
(exwm-config--fix/ido-buffer-window-other-frame): Do not use advice.
Fix issues when switching form/to floating frames.
Putting Emacs frames (workspace frames, floating frames) into dedicated
containers greatly simplifies the stacking order management and totally
fixes relevant issues.
* exwm-floating.el (exwm-floating--set-floating): Create floating frame
container. Remove redundant stacking order modification code.
(exwm-floating--unset-floating): Destroy the floating frame container.
No need to reparent the X window container.
(exwm-floating--do-moveresize): Resize the floating frame container.
* exwm-input.el (exwm-input--update-focus): No need to restack frames.
* exwm-layout.el (exwm-layout--show, exwm-layout--set-frame-fullscreen)
(exwm-layout-enlarge-window): Resize the floating frame container.
* exwm-manage.el (exwm-manage--on-ConfigureRequest): Re-enable stacking
order modification on ConfigureRequest.
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Reparent out all
frames on exit. No need to remove selected events or created resources.
(exwm-workspace--init): Create workspace frame containers.
* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--unmanage-window): Remove a redundant call to
`xcb:flush'.
* exwm-manage.el (exwm-manage--unmanage-window): Force unmap the X window.
Unmap the floating frame before reparent it.
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Prevent flickering when creating/removing
a floating X window.
* exwm-layout.el (exwm-layout--show): Show X windows after resizing to
prevent flickering.
* exwm-manage.el (exwm-manage--unmanage-window): Reduce flickering by
hiding the container.
(exwm-manage--kill-buffer-query-function): Prevent flickering by hiding the
container (except that the X window destroys itself after receiving the
WM_DELETE_WINDOW client message).
* exwm-systemtray.el (exwm-systemtray--embed): Default to visible if the
XEMBED_MAPPED flag is not set.
(exwm-systemtray--on-ClientMessage): Only embed new icons. Ignore balloon
messages.