* 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.
* exwm-workspace.el (exwm-workspace-switch-hook): New hook run by
`exwm-workspace-switch'.
* exwm-randr.el (exwm-randr-refresh-hook): New hook run by
`exwm-randr--refresh'.
* exwm-systemtray.el (exwm-systemtray--on-randr-refresh)
(exwm-systemtray--on-workspace-switch, exwm-systemtray--init): Update the
system tray in `exwm-randr-refresh-hook' and `exwm-workspace-switch-hook'.
* exwm-layout.el (exwm-layout--set-frame-fullscreen):
* exwm-workspace.el (exwm-workspace--post-init): Wait until all workspace
frames are set fullscreen.
* exwm-workspace.el (exwm-workspace--current-width)
(exwm-workspace--current-height): New functions for retrieving the width
and height of the current workspace.
* 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):
* exwm-workspace.le (exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify): Switch to
`exwm-workspace--current-width' and `exwm-workspace--current-height'.
* exwm-core.el:
* exwm-floating.el:
* exwm-floating.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el:
Clean up loading file. Set/Unset some functions as commands.
* README.md: Add intro to system tray.
* exwm-systemtray.el: New module adds a simple system tray (using the X11
System Tray protocol).
* exwm-workspace.el (exwm-workspace-switch-hook, exwm-workspace-switch):
New hook run after switching workspace.
* exwm-floating.el (exwm-floating--set-floating): Make floating frames
invisible before resizing them.
(exwm-floating--fit-frame-to-window): Removed since unused.
* exwm-layout.el (exwm-layout-hide-mode-line, exwm-layout-show-mode-line):
Use set frame height instead of exwm-floating--fit-frame-to-window.
* exwm-core.el (exwm-mode): Replace `exwm-manage--close-window' with
`exwm-manage--kill-buffer-query-function'.
* exwm-floating.el (exwm-floating--unset-floating): Reparent out floating
frames.
* exwm-manage.el (exwm-manage--unmanage-window): Reparent out floating
frames. Hide floating frames.
(exwm-manage--close-window, exwm-manage--kill-buffer-query-function):
Rename `exwm-manage--close-window' since it's only used in
`kill-buffer-query-functions'. Reparent out floating frames.
* exwm-workspace.el (exwm-workspace--init, exwm-workspace--post-init): Move
work to postpone to the new function `exwm-workspace--post-init'.
* exwm.el (exwm-init): Call `exwm-workspace--post-init' after
`exwm--unlock`.
* exwm-manage.el (exwm-manage--scan): Unmap X windows before managing them.
(exwm-manage--on-UnmapNotify): Do not ignore synthetic UnmapNotify events
(according to ICCCM). Do not use the `from-configure' slot which was
mistakenly introduced due to the bug in `exwm-manage--scan'.
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Do more cleanups.
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): New function
called on exit to unmanage X windows.
(exwm-workspace--init): Set `confirm-kill-emacs' to
`exwm-workspace--confirm-kill-emacs'.
* exwm-manage.el (exwm-manage--on-UnmapNotify): Ignore UnmapNotify event
generated as a result of parent being resized.
0e4055d339 introduced a few calls to exwm-workspace--resize-minibuffer
in various places. This function only works when the minibuffer is
displayed in its own frame but was called unconditionally in some cases.
Fix it by wrapping all calls in an appropriate conditional and add an
assertion. Also rename the function so it is clearer that it resizes a
frame, which might prevent calling it unconditionally in the future.
* exwm-layout.el (exwm-layout--set-frame-fullscreen):
* exwm-randr.el (exwm-randr--refresh):
* exwm-workspace.el (exwm-workspace--resize-minibuffer):
(exwm-workspace-switch):
* exwm.el (exwm--on-ClientMessage):
Calling `exwm-workspace-switch' in bc80eefe does not work correctly
sometimes. This commit improves it by directly specify the geometry info
rather than getting it from Emacs frame.
* exwm-randr.el (exwm-randr--refresh): Correct the _NET_WORKAREA property.
Reconfigure the current workspace when screen changes.
(exwm-randr--init): Run `exwm-randr-screen-change-hook' to take into
account already attached monitor(s),
* exwm.el (exwm--on-ClientMessage): Reconfigure the current workspace when
it's fullscreen.
* exwm-floating.el (exwm-floating--set-floating): Take auto-hiding
minibuffer into account when calculating available height.
(exwm-floating--unset-floating): Restack the container to avoid further
restacking.
* exwm-input.el (exwm-input--update-focus): Use more accurate restacking.
(exwm-input--on-minibuffer-setup): Replaced by
`exwm-layout--on-minibuffer-setup' and `exwm-workspace--on-minibuffer-setup'.
(exwm-input-command-whitelist, exwm-input--during-command)
(exwm-input--on-KeyPress-line-mode): The functionality of
`exwm-input-command-whitelist' is replaced by `exwm-input--during-command',
which can automatically tell whether functions like `read-event' are being
called.
(exwm-input--init): Add/remove corresponding hooks.
* exwm-layout.el (exwm-layout--on-minibuffer-setup): Also set input focus.
(exwm-layout--on-echo-area-change): New function for refreshing layout when
the size of echo area changes.
(exwm-layout--init): Track size changes for fixed minibuffer and echo area.
* exwm-manage.el (exwm-manage--on-ConfigureRequest): Never grant restacking
requests initiated by other clients.
* exwm-workspace.el (exwm-workspace--minibuffer): New variable for the
auto-hiding minibuffer.
(exwm-workspace-minibuffer-position): For setting the position of the
auto-hiding minibuffer.
(exwm-workspace-display-echo-area-timeout): Seconds before echo area
auto-hides.
(exwm-workspace--display-echo-area-timer): The corresponding timer.
(exwm-workspace-switch): Configure the auto-hiding minibuffer when
switching workspace.
(exwm-workspace--update-minibuffer): New function for adjusting the height
of the auto-hiding minibuffer.
(exwm-workspace--on-ConfigureNotify): New function for configuring the
container of the auto-hiding minibuffer.
(exwm-workspace--display-buffer): New function for forcing
`minibuffer-completion-help' to use the workspace frame.
(exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer):
New functions for showing/hiding the auto-hiding minibuffer (container).
(exwm-workspace--on-minibuffer-setup, exwm-workspace--on-minibuffer-exit):
New functions called when the auto-hiding minibuffer entered/exists.
(exwm-workspace--on-echo-area-dirty, exwm-workspace--on-echo-area-clear):
New functions when the auto-hiding echo area is ready to show/hide.
(exwm-workspace--init): Set up the auto-hiding minibuffer and workspace
frames. Track sizes changes for auto-hiding minibuffer and echo area.
No need to set OverrideRedirect on workspace frames.
* exwm.el (exwm--init-icccm-ewmh): Correct the value of _NET_WORKAREA.
This commit add workspace and X window containers support to avoid using
Emacs frames as the parents of X windows. This should make it easier to
set input focus.
* exwm-core.el (exwm--container, exwm--floating-frame-position): New file
local variables.
(exwm--floating-frame-geometry): Removed file local variable.
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating, exwm-floating--do-moveresize)
(exwm-floating-move): Use container.
(exwm-floating--fit-frame-to-window): No longer adjust stacking order.
(exwm-floating--fit-frame-to-window): The first member is changed to
buffer.
(exwm-floating--start-moveresize): Use container. Correctly set input
focus.
* exwm-input.el (exwm-input--redirected, exwm-input--on-focus-in): Removed.
(exwm-input--on-buffer-list-update): Remove the restriction on floating
frames which is no longer valid.
(exwm-input--update-focus): Adjust stacking order.
(exwm-input--on-minibuffer-setup): New function for setting focus on the
Emacs frame when entering minibuffer.
(exwm-input--on-KeyPress-line-mode): No longer compensate FocusOut event.
(exwm-input--grab-keyboard, exwm-input--release-keyboard): Local keys are
now grabbed on the X window container.
(exwm-input--init): Add `exwm-input--on-minibuffer-setup' to
`minibuffer-setup-hook'.
* exwm-layout.el (exwm-layout--resize-container): New function to
resize/reposition both the X window and its container.
(exwm-layout--show, exwm-layout--hide): Use container.
(exwm-layout-set-fullscreen): Use container. No longer save width and
height.
(exwm-layout-unset-fullscreen, exwm-layout--set-frame-fullscreen): Use
container.
(exwm-layout--refresh): Update a frame parameter. Remove dead code.
* exwm-manage.el (exwm-manage--manage-window): Reparent unmanaged X windows
to the workspace. Create X window container as the parent of the X window.
(exwm-manage--unmanage-window): Unmap/destroy container when appropriate.
Use the position of container.
(exwm-manage--unmanage-window): Destroy the container.
* exwm-randr.el (exwm-randr--refresh): Resize workspace using container.
* exwm-workspace.el (exwm-workspace-switch): Raise workspace.
Correctly set input focus.
(exwm-workspace--on-focus-in): Removed.
(exwm-workspace-move-window): Reparent to workspace container.
(exwm-workspace--init): Create workspace frames as visible.
Create workspace containers.
Remove exwm-workspace--on-focus-in from focus-in-hook.
Update _NET_VIRTUAL_ROOTS.
* exwm.el (exwm-init): No longer disable hourglass window.
Initialize workspace module before input.
* exwm-core.el (exwm--debug): New macro for setting debug forms.
* exwm-floating.el (exwm-floating--set-floating): No longer do `exwm--lock'
and `exwm--unlock' since `make-frame' is already adviced to take care of
everything. Correctly set input focus to the newly created floating
X window.
* exwm-core.el (exwm--floating-edges): Removed file local variable.
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating):
* exwm-layout.el (exwm-layout--show, exwm-layout-enlarge-window):
* exwm-manage.el (exwm-manage--on-ConfigureRequest):
No longer use floating geometry.
* exwm-input.el (exwm-input--update-global-prefix-keys): Grab global keys
on workspaces containers instead of the root window (or input focus would
transfer to the workspace containing the pointer when the grab is active).
* exwm-workspace.el (exwm-workspace-switch): No longer move mouse.
* exwm-input.el (exwm-input--on-MappingNotify, exwm-input--init): Remove
the event listener for MappingNotify event (it should be handled in the
underling library instead).
* exwm-core.el (exwm-mode): Use the return value of
exwm-manage--close-window.
* exwm-manage.el (exwm-manage--close-window): Kill empty buffers; Handle X
windows that does not support _NET_WM_PING.
(exwm-manage--kill-client): Kill X windows supporting _NET_WM_PID with
both SIGKILL and KillClient.
* exwm-floating.el (exwm-floating--set-floating): Reparent floating frames
as late as possible.
* exwm-manage.el (exwm-manage--unmanage-window): Hide floating frames first
on unmanagement.
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace--on-focus-in):
Delay closing minibuffer until Emacs is idle. This prevent nonlocal exits
from interrupting remaining code.
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace--on-focus-in):
Use handle-switch-frame instead of exwm-workspace--switch-count to filter
out events.
* exwm-workspace.el (exwm-workspace--init): Delay making workspaces
fullscreen.
* exwm-workspace.el (exwm-workspace-move-window):
* exwm-floating.el (exwm-floating--set-floating):
* exwm-layout.el (exwm-layout--refresh):
`set-buffer-major-mode` does not accept buffer names.
* exwm-core.el (exwm--make-emacs-idle-for): Removed.
* exwm-workspace.el (exwm-workspace--switch-count): New variable.
(exwm-workspace-switch): Increase exwm-workspace--switch-count when
necessary; Remove the call to exwm--make-emacs-idle-for.
(exwm-workspace--on-focus-in): Consume exwm-workspace--switch-count.
* exwm-workspace.el (exwm-workspace--on-focus-in): Close active minibuffer.
* exwm-workspace.el (exwm-workspace-switch): An active minibuffer on another
workspace might cause problems for input. Closing it should be
sufficient.
* exwm-input.el (exwm-input-command-whitelist): New variable.
(exwm-input--on-KeyPress-line-mode): Allow certain commands which receive
inputs without using the minibuffer to work in line-mode.
* exwm-manage.el (exwm-manage--manage-window): Restrict the check of
_MOTIF_WM_HINTS to only Java applications (since some other applications
like Evince would also set it).
Some subrs (e.g. x-file-dialog) create X windows and block the execution of
EXWM, so they won't work normally. This commit partly fixes this issue by
invoking them in a subordinate Emacs instance and trying to fetch the
result back.
* exwm.el (exwm-blocking-subrs): New variable for specify such subrs.
* exwm.el (exwm-enable, exwm--server-name, exwm--server-stop)
(exwm--server-eval-at): The implementation.
* exwm-core.el:
* exwm-floating.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-randr.el:
Evaluate constants at compile-time.
* README.md: Renamed from README.org to make the 'Commentary:' section
used by GNU ELPA instead.
* exwm.el: Depends on XELB version 0.3.
* exwm-input.el (exwm-input--on-KeyPress-line-mode, exwm-input-prefix-keys):
Allow users to disable 'C-c' prefixed keys; Add 'C-c' to / remove 'M-!'
from the default prefix keys.
* exwm-workspace.el (exwm-workspace--x-create-frame, exwm-workspace--init):
Advice `x-create-frame' to prevent it from hanging EXWM, making e.g.
speedbar working.
* exwm-floating.el (exwm-floating--set-floating): Remove the now unnecessary
request that sets override-redirect on floating frames.
* exwm-manage.el (exwm-manage--manage-window): Only grab left/middle/right
buttons.
* exwm-input.el (exwm-input--on-ButtonPress): Only perform click-to-focus on
unfocused X windows.
* exwm-input.el (exwm-input--update-focus): Do not focus an X window on
another workspace, but instead keep focusing on the current one and set
exwm--urgency parameter on that frame.
* exwm-input.el (exwm-input--fake-key): Send KeyRelease event (some
applications reply on it).