about summary refs log tree commit diff
path: root/exwm.el (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-05-23 Add cleanup codes for Emacs daemonChris Feng1-3/+27
* 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.
2016-05-13 Use `xcb:connect' instead of `xcb:connect-to-socket'Chris Feng1-1/+1
* exwm.el (exwm-init): * exwm-systemtray.el (exwm-systemtray--init): Use `xcb:connect' instead of `xcb:connect-to-socket'.
2016-04-03 Some commands should be called interactivelyChris Feng1-1/+1
* exwm-layout.el (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen) (exwm-layout-show-mode-line): * exwm.el (exwm-reset): Call `exwm-input-grab-keyboard' and `exwm-input-release-keyboard' interactively.
2016-03-25 Fix emacsclient issuesChris Feng1-1/+1
* exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): * exwm-workspace.el (exwm-workspace--on-minibuffer-setup) (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) (exwm-workspace--on-echo-area-clear): Exclude non-graphical frames. * exwm.el (exwm--server-eval-at): Avoid using `x-dispaly-name'.
2016-03-06 UntabifyChris Feng1-3/+3
2016-02-25 Bump version to 0.4Chris Feng1-1/+1
2016-02-22 Bump version to 0.3Chris Feng1-2/+2
2016-02-21 Fix emacsclient related issuesChris Feng1-1/+1
* 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.
2016-02-19 Fix system tray issues after updating workspacesChris Feng1-12/+4
* 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.
2016-02-12 Bump version to 0.2Chris Feng1-2/+2
2016-02-12 Postpone making workspace frames fullscreenChris Feng1-0/+1
* 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`.
2016-02-06 Improve bc80eefeChris Feng1-3/+1
* 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.
2016-02-06 Fix multi-monitor/fullscreen issuesChris Feng1-1/+3
* 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.
2016-02-06 Add auto-hiding minibuffer supportChris Feng1-2/+6
* 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.
2016-02-03 Merge branch 'feat/virtual-root'Chris Feng1-3/+2
2016-02-03 Rework the X windows hierarchy modelChris Feng1-3/+2
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.
2016-02-02 Update copyright year to 2016Chris Feng1-1/+1
2015-11-03 Bump version to 0.1Chris Feng1-1/+1
2015-11-02 Disable some incompatible featuresChris Feng1-0/+3
* exwm.el (exwm-init): exwm-config.el (exwm-config-misc): Disable dialog boxes and hourglass pointer by default.
2015-10-28 Add demo configurationsChris Feng1-38/+7
* exwm-config.el: Demo EXWM configurations. * xinitrc: Demo xinitrc file. * exwm.el (exwm-enable-ido-workaround, exwm-disable-ido-workaround): Partly moved to exwm-config.el.
2015-09-27 Work around subrs that block EXWM; other minor fixesChris Feng1-7/+72
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.
2015-09-17 On-demand update exwm-workspace--switch-historyChris Feng1-2/+2
* exwm-workspace.el (exwm-workspace--switch-history-outdated) (exwm-workspace--update-switch-history, exwm-workspace-switch) (exwm-workspace-move-window): * exwm.el (exwm--update-hints, exwm--on-ClientMessage): * exwm-floating.el (exwm-floating--set-floating): * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window): Update exwm-workspace--switch-history only when it's used.
2015-09-16 Allow showing buffers on other workspaces and moving an X window by switchingChris Feng1-1/+3
to its buffer * exwm-workspace.el (exwm-workspace-show-all-buffers, exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): Show buffers on other workspaces if `exwm-workspace-show-all-buffers' is non-nil. * exwm-layout.el (exwm-layout-show-all-buffers, exwm-layout--refresh): Allow moving an X window by switch to its corresponding buffer from another workspace when `exwm-layout-show-all-buffers' is non-nil. * exwm.el (exwm--ido-buffer-window-other-frame): Handle the case when `exwm-layout-show-all-buffers' is non-nil. * exwm-floating.el (exwm-floating--set-floating): Handle the case when *scratch* buffer is killed. * exwm-workspace.el (exwm-workspace-switch-to-buffer): Renamed from `exwm-workspace-switch-to-window' to better reflect its role.
2015-09-09 Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etcChris Feng1-0/+2
The _NET_CLIENT_LIST_STACKING EWMH property is essential for e.g. the tabbar of chromium to work correctly. * exwm-input.el: Remove invalid TODO item. * exwm.el (exwm--init-icccm-ewmh): Add xcb:Atom:_NET_CLIENT_LIST and xcb:Atom:_NET_CLIENT_LIST_STACKING to _NET_SUPPORTED. * exwm-layout.el (exwm-layout--refresh): Update _NET_CLIENT_LIST_STACKING. * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window): Update _NET_CLIENT_LIST.
2015-09-04 Prepare for GNU ELPA releaseChris Feng1-235/+63
* Transfer copyright to Free Software Foundation * Add packaging components (e.g. headers) * Coding style fixes: + Quote functions with "#'" + Wrap long lines + Fix doc strings / comments * Replace `string-to-int' with `string-to-number' * Fix compiling errors / eliminate compiling warnings + Add exwm-core.el to hold common variables, functions and macros * Remove the redundant COPYING file * Add .gitignore * Rename README to README.md
2015-08-26 Correct several EWMH propertiesChris Feng1-9/+1
The following EWMH properties on the root window are corrected in this commit: _NET_VIRTUAL_ROOTS, _NET_WORKAREA and _NET_DESKTOP_VIEWPORT.
2015-08-24 Avoid using the "no window manager" code in EmacsPhilip1-2/+16
* exwm.el (exwm--on-ClientMessage): Handle fullscreen requests for frames. (exwm-init): Initialize workspaces after unlocking events. * exwm-workspace.el (exwm-workspace--init): Create frames as invisible, then make them visible only once their OverrideRedirect property has been set. * exwm-randr.el (exwm-randr--refresh): New frame parameter `exwm-geometry'. * exwm-layout.el (exwm-layout--set-frame-fullscreen): New function. The Emacs code is buggy, see https://github.com/ch11ng/exwm/issues/39 https://github.com/ch11ng/exwm/pull/42
2015-08-13 Fix multi-screen bugsChris Feng1-2/+0
* RandR module is now made optional; users can enable it with `exwm-randr-enable`. * Correct the calculation of sizes/coordinates at various places. * Input focus is now tracked with (Emacs) window instead of buffer since the latter can be ambiguous in multi-screen settings.
2015-08-13 Minor fixes for emacsclientChris Feng1-3/+3
2015-08-12 Improve input focus switch mechanismChris Feng1-12/+6
This commit should fix most input focus bugs (especially those related to floating windows). The actual settings of input focus are delayed to exclude redundant event. Dead code since this commit is removed. This commit also fixes a bug for non-floating windows converted form floating state. The workaround for `ido-mode` is also improved to properly handle `exwm-mode` buffers.
2015-08-11 Fix buffer switch problemsChris Feng1-0/+24
* Prevent switching to floating windows or windows on other workspaces * Provide a workaround for `ido-mode` (can be enabled with `(exwm-enable-ido-workaround)`)
2015-08-10 Remove redundant code caused by the concurrency of events (continued)Chris Feng1-17/+9
Remove `exwm--with-current-id`, which was introduced to as a wrapper to `with-current-buffer` to do extra checks. Note that in functions run as hooks, the validation of window ID is still required as they are not synchronized with events.
2015-08-10 Fix emacsclient bugsChris Feng1-4/+5
`emacsclient` started with `-c` or `-t` argument create a new frame that shall not be used to manage X windows. Also fix some related input focus issues (with some remaining unfixed). Close #17.
2015-08-08 Correct layout refresh problemsChris Feng1-0/+3
* Relax the conditions to refresh layout; this may introduce some overheads though * Fix the problem when `*scratch*` buffer is killed; close #12 * Enhance `exwm-reset` by forcing layout refresh in it. This should allow users to overcome some layout bugs
2015-08-08 Fix some input focus issuesChris Feng1-0/+3
* Fix input focus lost after moving window to another workspace * Enhance `exwm-reset` to provide user a way to reset input focus when it's lost unexpectedly
2015-08-07 Various input fixesChris Feng1-2/+4
* Fix `exwm-reset` * Make input mode buffer local * Allow window to stay in `char-mode` while setting input focus to other window or switching to other workspace
2015-08-06 Check buffer mode in exwm-resetChris Feng1-3/+4
This should prevent users from misoperation.
2015-08-06 Fix fullscreen issuesChris Feng1-1/+2
* Correct ConfigureNotify events sent to fullscreen windows. * Exit fullscreen mode before switching workspace. * Temporarily treat `xcb:Atom:_NET_WM_STATE_ABOVE` as `xcb:Atom:_NET_WM_STATE_FULLSCREEN` since a) "plugin-container" (Flash Player) seems only set this, and b) it's not normally used by applications. This makes fullscreen videos working in e.g. iceweasel.
2015-08-05 Fix typosMarkus S.1-3/+3
2015-08-03 Add basic RandR supportChris Feng1-1/+2
This implementation is analogous to that in i3-wm, which requires external tools to properly configure RandR first.
2015-07-18 Various fixes for workspaceChris Feng1-0/+4
Fixes for full screen, move window, etc.
2015-07-17 First commitChris Feng1-0/+706