* exwm-input.el (exwm-input--mimic-read-event): New function for
handling `extra-keyboard-modifiers' and `keyboard-translate-table'.
(exwm-input--cache-event): Do not unread events here.
(exwm-input--on-KeyPress-line-mode)
(exwm-input--on-KeyPress-char-mode): Compare with preprocessed events
and unread raw ones.
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Add support for
`overriding-terminal-local-map'.
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Do not test
`exwm-mode-map' to see if a key should be forwarded to Emacs as it's
overridden when local simulation keys are present.
* exwm-input.el (exwm-input--on-pre-command): Keys should be forwarded
to the X window (if its Emacs window is currently selected) after
exiting the minibuffer.
(exwm-init): Do not signal an error on startup.
* exwm-floating.el (exwm-floating-toggle-floating):
* exwm-input (exwm-input-send-next-key)
(exwm-input-send-simulation-key):
* exwm-layout (exwm-layout-set-fullscreen)
(exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Fix
incorrect use of `cl-return-from'.
* exwm.el (exwm--on-SelectionClear, exwm--init-icccm-ewmh)
(exwm--exit-icccm-ewmh, exwm--wmsn-acquire, exwm--wmsn-release):
Get the window manager selection; die when it is cleared.
* exwm.el (exwm-init, exwm-exit): Clean up when failing to start.
(exwm--exit-icccm-ewmh): Stop deleting root window properties on
exit: delete function.
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace)
(exwm-workspace--init):
* exwm-input.el (exwm-input--init):
* exwm-floating.el (exwm-floating--set-floating): Name created
helper windows with prefix "EXWM".
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Move
deinitialization to `exwm-workspace--exit'.
(exwm-workspace--exit): Reparent minibuffer frame to the root
window, turn workspace frames into regular frames, restore frame
parameters.
(exwm-workspace--init): Reset the fullscreen counter.
(exwm-workspace--remove-frame-as-workspace): Reset fullscreen
state.
(exwm-workspace--init-minibuffer-frame)
(exwm-workspace--exit-minibuffer-frame): New functions configuring
the minibuffer frame.
(exwm-workspace--init, exwm-workspace--exit): Use the above
functions to configure the minibuffer frame.
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace)
(exwm-workspace--remove-frame-as-workspace): Limit functionality
to the configuration of frames as workspaces.
(exwm-workspace--on-after-make-frame)
(exwm-workspace--on-delete-frame): Callbacks run on frame creation
and deletion that may use or stop them from being used as
workspaces.
* exwm-manage.el (exwm-manage--unmanage-window): Map windows when
quitting.
(exwm-manage--exit): Remap all windows.
* exwm.el (exwm--exit): Reorder deinitialization sequence so that
windows are reparented before the workspaces are removed.
* exwm-layout.el (exwm-layout--show): Always set an X window in
fullscreen mode the size in fullscreen.
(exwm-layout-unset-fullscreen): Leave the fullscreen mode first.
* exwm-layout.el (exwm-layout--fullscreen-p): New function telling
whether the current buffer is in fullscreen mode.
(exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen)
(exwm-layout-toggle-fullscreen):
* exwm-manage.el (exwm-manage--manage-window)
(exwm-manage--on-ConfigureRequest):
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap)
(exwm-workspace-move):
* exwm.el (exwm-reset, exwm--on-ClientMessage): Use it.
* exwm-manage.el (exwm-manage-configurations):
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Allow customizing header-line format
for floating/tiling X windows.
* exwm-manage.el (exwm-manage-configurations): Add options for
fullscreen mode and floating & tiling mode-line formats.
(exwm-manage--manage-window): Add support for configuring
line-mode/char-mode, prefix keys, simulation keys and fullscreen mode.
* exwm-floating.el (exwm-floating--set-floating): Add support for
configuring the geometry, mode-line format and border width of a
floating X window.
(exwm-floating--unset-floating): Add support for configuring the
mode-line format of a tiling X window.
* exwm-core.el (exwm--configurations): New buffer-local variable
recording the configurations of an X window.
* exwm-manage.el (exwm-manage-configurations): New user option as the
per-application configurations.
(exwm-manage--get-configurations): New function for fetching the
configurations of this X window.
(exwm-manage--manage-window): Fetch the configurations and check if
the X window should be floating/tiling.
* exwm-input.el (exwm-input--set-simulation-keys): New function for
actullay setting simulation keys.
(exwm-input-simulation-keys, exwm-input-set-local-simulation-keys)
(exwm-input--init): Use this instead of
`exwm-input-set-simulation-keys'.
(exwm-input-set-simulation-keys): Make obsolete.
(exwm-input--read-keys): New function for reading an arbitrary key
sequence.
(exwm-input-set-simulation-key): New command for setting a new
simulation key (which can be saved in the Customize interface).
* exwm-input.el (exwm-input--set-key): New function for actually
setting the binding.
(exwm-input-global-keys): New user option for customizing global keys.
(exwm-input-set-key): Update `exwm-input-global-keys' and call
`exwm-input--set-key'
(exwm-input--init): Initialize global keys.
* exwm-workspace.el (exwm-workspace--set-active): New function for
setting the 'exwm-active' frame parameter and show/hide frames BTW.
(exwm-workspace--active-p): New function checking whether a frame is
active.
(exwm-workspace--set-fullscreen, exwm-workspace-switch)
(exwm-workspace-move-window):
* exwm-randr.el (exwm-randr--refresh): Use them.
* exwm-workspace.el (exwm-workspace-attach-minibuffer)
(exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer):
Show/Hide the minibuffer frame.
* exwm-randr.el (exwm-randr--refresh): Mark active workspaces.
* exwm-workspace.el (exwm-workspace-switch): Use the marks to
show/hide X windows when switching workspace; do not update timestamp.
(exwm-workspace-move-window): Use the marks to hide X windows after
moving them.
(exwm-workspace--init): Update `frameset-filter-alist'.
* exwm-input.el (exwm-input--on-CreateNotify): New function for
grabbing global keys on newly created X windows.
(exwm-input--update-global-prefix-keys): Grab global keys on top-level
X windows instead of the root window.
(exwm-input--grab-global-prefix-keys): New function for grabbing
global keys on X windows.
(exwm-input--release-keyboard): Grab global keys in char-mode.
(exwm-input--init): Select CreateNotify events.
* exwm-core.el (exwm--unlock):
* exwm-input.el (exwm-input--on-FocusIn, exwm-input--init): Do not
handle FocusIn events on the root window.
* exwm-core.el (exwm--unlock): Select FocusChange events on the root
window.
* exwm-input.el (exwm-input--on-FocusIn): Input focus should stay on
the current workspace when the root window receives a FocusIn event.
* exwm-randr.el (exwm-randr--refresh): Always set the name of primary
output.
* exwm-workspace.el (exwm-workspace-switch)
(exwm-workspace-move-window): Use 'exwm-randr-output' frame parameter
to check if two frames are on the same output.
* exwm-input.el (exwm-input-simulation-keys): New user option for
setting simulation keys.
(exwm-input--init): Initialize simulation keys from this variable.
* exwm-input.el (exwm-input--simulation-prefix-keys)
(exwm-input--on-KeyPress-line-mode)
(exwm-input--update-simulation-prefix-keys)
(exwm-input-set-simulation-keys, exwm-input-set-local-simulation-keys)
(exwm-input-send-simulation-key): `exwm-input--simulation-keys' is now
a hash table storing both simulation keys and prefix keys.
(exwm-input--unset-simulation-keys): Clear the hash table.
(exwm-input--exit): Use `exwm-input--unset-simulation-keys'.
* exwm-core.el (exwm--kmacro-map, exwm-mode-menu): Adapt to the
change of `exwm-input--simulation-keys'.
* exwm-config.el (exwm-config-default): Update the example.
* exwm-workspace.el (exwm-workspace-switch): Do not hide X windows
when switching to a workspace on another output; update the
timestamp (last switched to) of a workspace frame.
(exwm-workspace-move-window): Do not hide an X window when moving it
to an active workspace on another output.
* exwm-floating.el (exwm-floating--set-floating):
* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--manage-window)
(exwm-manage--on-ConfigureRequest):
* exwm-systemtray.el (exwm-systemtray--refresh)
(exwm-systemtray--init):
Correct coordinate calculations.
* exwm-workspace.el (exwm-workspace--current-width): Removed since no
longer used.
; Setting _NET_WM_DESKTOP to 0xffffffff makes an X windows appearing
; on all desktops (EWMH). It's tricky to do it for tiling X windows
; so it's not implemented.
* exwm-core.el (exwm--desktop): New buffer-local variable recording
the value of _NET_WM_DESKTOP.
* exwm-layout.el (exwm-layout--hide): Do not hide X windows with this
property set to 0xffffffff.
* exwm.el (exwm--update-desktop): New function for fetching the value
of _NET_WM_DESKTOP and setting `exwm--desktop'.
* exwm-manage.el (exwm-manage--manage-window): Use it.
* exwm-workspace.el (exwm-workspace--set-desktop): Also update
`exwm--desktop'.