about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-25 Fix exwm-workspace-switch-to-bufferChris Feng1-4/+13
* exwm-workspace.el (exwm-workspace-switch-to-buffer): Select the floating frame when switching to a floating X window buffer.
2016-02-25 Bump version to 0.4Chris Feng1-1/+1
2016-02-25 Allow user to hide floating X windowsChris Feng3-1/+18
* 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.
2016-02-24 Refresh the workspace after creating a floating X windowChris Feng1-0/+2
* exwm-floating.el (exwm-floating--set-floating): Refresh the workspace (since auto-refresh was disabled).
2016-02-24 Fix issues with moving X windows between workspacesChris Feng1-38/+56
* 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.
2016-02-23 Make input focus revert to pointer rootChris Feng1-1/+2
* exwm-input.el (exwm-input--set-focus): Input focus should not revert to parent (which was the Emacs frame) any more.
2016-02-22 Bump version to 0.3Chris Feng1-2/+2
2016-02-21 Fix emacsclient related issuesChris Feng5-16/+15
* 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-21 Various fixes for floating X windowsChris Feng2-25/+91
* 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.
2016-02-21 Fix the advice function for ido-buffer-window-other-frameChris Feng1-13/+30
* 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.
2016-02-20 Prevent Emacs frames from restacking themselvesChris Feng5-121/+192
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.
2016-02-20 Prevent/Reduce flickering issues with floating X windowsChris Feng3-29/+78
* 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).
2016-02-20 Redefine mode-specific keysChris Feng1-6/+6
* exwm-core.el (exwm-mode-map): Redefine mode-specific keys to comply with the key binding conventions.
2016-02-19 Merge branch 'feat/systemtray' into externals/exwmChris Feng10-71/+516
A simple system tray based on the X11 'System Tray' and XEmbed protocol.
2016-02-19 Minor fixes for system trayChris Feng1-9/+12
* 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.
2016-02-19 Fix system tray issues after updating workspacesChris Feng10-90/+159
* 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-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.