about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-19 Add system tray supportChris Feng2-4/+377
* 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.
2016-02-18 Fix floating X window bugs introduced by 9c95c03eChris Feng4-114/+137
* 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.
2016-02-12 Bump version to 0.2Chris Feng1-2/+2
2016-02-12 Postpone making workspace frames fullscreenChris Feng2-5/+9
* 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-09 Fix bugs on managing/unmanaging X windowsChris Feng2-10/+27
* 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.
2016-02-07 Eliminate compilation warningsChris Feng4-0/+5
2016-02-07 Unmanage X windows on exitChris Feng2-8/+18
* 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.
2016-02-07 Add some useful key bindingsChris Feng4-33/+49
* exwm-core.el (exwm--floating-mode-line-format, exwm--mode-line-format) (exwm-mode-map): * exwm-floating.el (exwm-floating-hide-mode-line) (exwm-floating-show-mode-line): * exwm-layout.el (exwm-layout-hide-mode-line, exwm-layout-show-mode-line) (exwm-layout-toggle-mode-line): Allow hide/show mode-line for all `exwm-mode' buffers with 'C-c M'. * exwm-config.el (exwm-config-default): Add simulation keys for 'C-d' and 'C-k'.
2016-02-07 Remove an assertionChris Feng1-35/+36
* exwm-randr.el (exwm-randr--refresh): There can be no valid output sometimes.
2016-02-07 Merge branch 'fjl-fix-resize-minibuffer'Chris Feng4-10/+17
2016-02-06 Resize minibuffer only when it's in its own frameFelix Lange4-10/+17
0e4055d3392 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.
2016-02-06 Improve bc80eefeChris Feng4-27/+37
* 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 Feng2-4/+17
* 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 Feng6-71/+320
* 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 Feng8-354/+370
2016-02-03 Avoid unnecessary changes of stacking orderChris Feng1-8/+22
* exwm-input.el (exwm-input--update-focus): Only restack a tiling X window when it's not the last but one sibling. This should reduce flickering.
2016-02-03 Rework the X windows hierarchy modelChris Feng8-354/+356
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 Feng9-9/+9
2015-12-13 Remove the MappingNotify event listenerChris Feng1-19/+0
* 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).
2015-12-11 Add support for desktop and dockChris Feng1-7/+11
* exwm-manage.el (exwm-manage--manage-window): Add support for _NET_WM_WINDOW_TYPE_DESKTOP and _NET_WM_WINDOW_TYPE_DOCK (they are not reparented).
2015-11-15 Limit X host-based auth permissions.W. Greenhouse1-1/+1
We don't need more than the currently logged in user to have access to the X session, so don't grant X host access to other users.
2015-11-10 Fix a typoChris Feng1-1/+1
* exwm-manage.el (exwm-manage--on-MapRequest): Correct a wrong variable name.
2015-11-03 Bump version to 0.1Chris Feng1-1/+1
2015-11-02 Disable some incompatible featuresChris Feng2-3/+4
* exwm.el (exwm-init): exwm-config.el (exwm-config-misc): Disable dialog boxes and hourglass pointer by default.
2015-11-01 Add hook run when screen changesChris Feng1-5/+15
* exwm-randr.el (exwm-randr-screen-change-hook): New hook. (exwm-randr--init): Run the new hook in the event handler of ScreenChangeNotify.
2015-10-30 Use new calling conventions of xcb:keysymsChris Feng1-9/+15
* exwm-input.el: Use new calling conventions of xcb:keysyms
2015-10-29 Improve robustness of killing buffersChris Feng2-32/+40
* 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.
2015-10-29 Avoid mapping managed X windows on MapRequestChris Feng1-10/+8
* exwm-manage.el (exwm-manage--manage-window, exwm-manage--on-MapRequest): Check managed X windows in exwm-manage--on-MapRequest instead.
2015-10-28 Check KEYSYMs converted from eventsChris Feng1-3/+14
* exwm-input.el (exwm-input--update-global-prefix-keys) (exwm-input--fake-key, exwm-input--init): Check the return value of xcb:keysyms:event->keysym.
2015-10-28 Add demo configurationsChris Feng3-38/+122
* 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-10-28 Make the creation/destruction of floating frames more silentChris Feng2-11/+16
* 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.
2015-10-28 Minor input focus fixChris Feng1-1/+1
* exwm-input.el (exwm-input--on-buffer-list-update): Schedule input focus switch with idle timer.
2015-10-27 Delay closing minibufferChris Feng1-3/+2
* 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.
2015-10-26 Fix problems introduced/exposed by last commitChris Feng4-30/+32
* 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.
2015-10-25 Fix workspace switch issuesChris Feng2-6/+10
* 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.
2015-10-19 Close the (possible) active minibuffer when switching workspaceChris Feng1-0/+2
* exwm-workspace.el (exwm-workspace-switch): An active minibuffer on another workspace might cause problems for input. Closing it should be sufficient.
2015-10-17 Allow certain commands to receive key events in line-modeChris Feng1-0/+8
* 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.
2015-10-11 Improve robustnessChris Feng1-2/+9
* exwm-input.el (exwm-input--update-focus, exwm-input--on-ButtonPress): Make sure Emacs windows are alive before manipulating them.
2015-10-10 Restrict the check of _MOTIF_WM_HINTSChris Feng1-2/+5
* 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).
2015-10-01 Fix a position calculation error on multi-monitor settingsChris Feng1-2/+9
* exwm-floating.el (exwm-floating--set-floating): Always use relative positions.
2015-09-27 Work around subrs that block EXWM; other minor fixesChris Feng7-72/+158
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-25 Fix click-to-focus on multi-monitor settingsChris Feng1-1/+15
* exwm-input.el (exwm-input--on-ButtonPress): [click-to-focus] Switch to the corresponding workspace if necessary.
2015-09-24 Fix a calculation error of the position of a floating frameChris Feng1-2/+2
* exwm-floating.el (exwm-floating--set-floating): The position of a floating frame should be relative to its workspace.
2015-09-23 Adjust default prefix keys; advice x-create-frameChris Feng3-7/+15
* 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.
2015-09-21 Minor fixes for packagingChris Feng4-13/+18
* .gitignore: Add ELPA files. * exwm-workspace.el: Autoload exwm-workspace-switch. * README.org: Renamed from README.md; add an installation note.
2015-09-20 Fix input & input focus issuesChris Feng2-27/+37
* 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).
2015-09-19 Manage non-floating windows without decorationsChris Feng1-3/+9
* exwm-manage.el (exwm-manage--manage-window): Should manage non-floating windows without decorations.
2015-09-19 Check _MOTIF_WM_HINTS when attempting to manage an X windowChris Feng2-5/+35
* exwm-core.el: New buffer-local variable exwm--mwm-hints. * exwm-manage.el: New variable exwm--atom-_MOTIF_WM_HINTS for holding the value of _MOTIF_WM_HINTS atom; new function exwm--update-mwm-hints for updating the _MOTIF_WM_HINTS property of an X window. * exwm-manage.el (exwm-manage--init): Intern the _MOTIF_WM_HINTS atom. * exwm-manage.el (exwm-manage--manage-window): Avoid managing windows without decoration (implied by _MOTIF_WM_HINTS).
2015-09-19 Avoid autoloading variablesChris Feng3-2/+2
* exwm-floating.el: * exwm-layout.el: Avoid autoloading exwm-floating-border-width. * exwm-workspace.el: Avoid autoloading exwm-workspace--switch-history-outdated.
2015-09-18 Prevent Emacs cursor style change when pointer is in an X windowChris Feng1-0/+15
* exwm-input.el (exwm-input--on-KeyPress-char-mode): Compensate FocusOut event by sending a synthetic FocusIn event to prevent the change of cursor style (e.g. box to hollow) when pointer is in an X window.