about summary refs log tree commit diff
path: root/exwm-workspace.el (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-06 Add interactive commands for starting and stopping EXWMAdrián Medraño Calvo1-1/+1
* exwm.el (exwm-reset): Remove autoload cookie. (exwm-init, exwm-exit): Add autoload cookie and interactive declaration.
2018-03-06 Disconnect on `exwm--exit'Adrián Medraño Calvo1-39/+0
* exwm.el (exwm-exit): Disconnect `exwm-connection'. * exwm.el (exwm-init, exwm-exit, exwm--confirm-kill-emacs) * exwm-workspace.el (exwm-workspace--set-desktop-geometry) (exwm-workspace--init, exwm-workspace--exit): Move `confirm-kill-emacs' to this exwm.el`. Delegate disconnection of `exwm--connection' to `exwm-exit'.
2018-03-06 Cleanup exwm-workspace on exitAdrián Medraño Calvo1-117/+132
* 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.
2018-03-06 Dissociate frame creation and deletion handlers from the actual ↵Adrián Medraño Calvo1-113/+139
configuration of frames as workspaces * 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.
2018-03-06 Prevent duplicate keys in frameset-filter-alistAdrián Medraño Calvo1-1/+2
* exwm-workspace.el (exwm-workspace--init): * exwm-randr.el (exwm-randr--init): Prevent duplicate keys in frameset-filter-alist
2018-03-04 Avoid switching buffer when moving an X window already in placeChris Feng1-1/+3
* exwm-workspace.el (exwm-workspace-move-window): This is required when calling `exwm-workspace-move-window' from `exwm-layout--refresh'.
2018-03-04 Fix fullscreen mode after switching workspace and backChris Feng1-3/+4
* 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.
2018-03-04 Add prefix arguments support for various commandsChris Feng1-16/+41
* exwm-workspace.el (exwm-workspace-switch) (exwm-workspace-switch-create, exwm-workspace-move) (exwm-workspace-move-window): Add prefix arguments support.
2018-03-03 Fix EXWM buffers not being hidden on workspace switchJohan Johansson1-5/+5
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace-move-window): Use `equal' to compare RandR output names.
2018-02-22 Hide blocked frames (they are visible with a compositor)Chris Feng1-26/+50
* 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.
2018-02-22 Mark active workspaces on each outputChris Feng1-43/+36
* 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'.
2018-02-20 Use the 'exwm-randr-output' frame parameter to determine the outputChris Feng1-38/+30
* 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.
2018-02-19 Fix various issues with multi-monitor supportChris Feng1-37/+68
* 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.
2018-02-19 Support displaying floating X windows on all workspacesChris Feng1-4/+6
; 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'.
2018-02-19 Add customization settingsChris Feng1-96/+122
; Also fix documentations.
2018-02-18 Make X windows container-lessChris Feng1-184/+136
; This is an attempt to make (managed) X windows container-less, i.e. direct children of the root window. This is mainly to make EXWM compatible with third-party compositors. Other issues like wrong absolute position should also get resolved by the way. The workspace containers ("virtual roots") are also removed. However Emacs frames are still wrapped in containers to avoid unexpected stack reordering. * exwm-cm.el: Make this module obsolete as EXWM supports third-party compositors now. * exwm-core.el (exwm--container): * exwm-floating.el (exwm-floating--set-floating) (exwm-floating--unset-floating, exwm-floating-hide) (exwm-floating--start-moveresize, exwm-floating--stop-moveresize) (exwm-floating--do-moveresize, exwm-floating-move): * exwm-input.el (exwm-input--update-focus): * exwm-layout.el (exwm-layout--show, exwm-layout--hide) (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen): * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window) (exwm-manage--kill-buffer-query-function, exwm-manage--kill-client): * exwm-workspace.el (exwm-workspace--set-fullscreen, exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace--add-frame-as-workspace) (exwm-workspace--remove-frame-as-workspace): Make adaptions for container-less X windows. * exwm-workspace.el (exwm-workspace--update-ewmh-props): * exwm.el (exwm--init-icccm-ewmh, exwm--exit-icccm-ewmh): No longer use virtual roots. * exwm-input.el (exwm-input--on-workspace-list-change) (exwm-input--update-global-prefix-keys, exwm-input--init, exwm-input--exit): From now on global key bindings are grabbed on the root window so it's no long required to re-grab them each time the workspace list changes. As a result `exwm-input--on-workspace-list-change' and its corresponding references are discarded. It remains to be seen if this change will raise input focus issues. * exwm-manage.el (exwm-manage--manage-window): Explicitly set the workspace for newly managed X windows. * exwm-floating.el (exwm-floating--set-floating): Avoid implicit reference to the current workspace. * exwm-core.el (exwm--set-geometry): New function for setting the geometry of an X window. * exwm-layout.el (exwm-layout--resize-container): Replaced by `exwm-layout--resize-container'. * exwm-core.el (exwm--guide-window): New global variable recording the guide X window. * exwm.el (exwm--init-icccm-ewmh): Set it. * exwm-input.el (exwm-input--post-init): New function containing staffs for initialization but should better get called after the event loop starts. * exwm.el (exwm-init): Use it.
2017-12-31 Update copyright year to 2018Chris Feng1-1/+1
2017-11-19 Fix various input focus issuesChris Feng1-7/+6
* exwm-input.el (exwm-input--on-buffer-list-update): Cancel the frame redirection introduced by 421c0512f7. * exwm-input.el (exwm-input--on-buffer-list-update): Only ignore temp buffers just switched from. * exwm-input.el (exwm-input--update-focus-commit): New function for ensuring the input focus lock can always be released. (exwm-input--update-focus-defer, exwm-input--update-focus): Use it. * exwm-input.el (exwm-input--update-focus): No need to select frames; only transfer X input focus. * exwm-core.el (exwm--defer): New macro for correcting the use of `run-with-idle-timer' by taking `current-idle-time' into account. * exwm-input.el (exwm-input--update-focus-defer) (exwm-input--update-focus): * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): * exwm-manage.el (exwm-manage--unmanage-window) (exwm-workspace--prompt-delete): * exwm-workspace.el (exwm-workspace-switch) (exwm-workspace--add-frame-as-workspace): Use it.
2017-07-16 Allow customizing workspace indexesChris Feng1-1/+5
* exwm-workspace.el (exwm-workspace-index-map): New variable for customizing workspace indexes. (exwm-workspace--update-switch-history): Use it.
2017-05-31 Allow switching to a workspace by selecting one X window on itChris Feng1-2/+12
* exwm-workspace.el (exwm-workspace-switch-to-buffer): Only allows it when `exwm-layout-show-all-buffers' is nil.
2017-05-30 Fix X display name comparisonChris Feng1-2/+5
* exwm-workspace--add-frame-as-workspace (exwm-workspace--add-frame-as-workspace): Manually compare X display names as there's no built-in function handles this correctly.
2017-04-16 Avoid comparing X display namesChris Feng1-2/+2
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace): An X display name set by XELB can be different from (but equivalent with) the one set by Emacs.
2017-03-05 Manually run `focus-in-hook' and `focus-out-hook'Chris Feng1-0/+19
; Since X windows are managed by EXWM, the current Emacs frame should always be considered focused logically. * exwm-workspace.el (exwm-workspace-switch): Manually run `focus-in-hook' and `focus-out-hook'. (exwm-workspace--handle-focus-in, exwm-workspace--handle-focus-out): New functions for overriding `handle-focus-in' and `handle-focus-out'. (exwm-workspace--init, exwm-workspace--exit): Override `handle-focus-in' and `handle-focus-out'
2017-02-24 Fix systemtray positionChris Feng1-1/+4
* exwm-workspace.el (exwm-workspace--update-workareas-hook): New hook run when workareas get updated. (exwm-workspace--update-workareas): Run the hook. * exwm-systemtray.el (exwm-systemtray--on-workspace-switch) (exwm-systemtray--on-randr-refresh): Take struts into account when calculating the position for systemtray. (exwm-systemtray--on-struts-update): Alias of `exwm-systemtray--on-randr-refresh'. (exwm-systemtray--init, exwm-systemtray--exit): Manipulate `exwm-workspace--update-workareas-hook'.
2017-02-05 Fix checkdoc warningsChris Feng1-1/+1
2017-02-05 Update copyright year to 2017Chris Feng1-1/+1
2017-01-03 Prevent certain frame parameters from being saved/restoredChris Feng1-1/+6
* exwm-input.el (exwm-input--init): * exwm-randr.el (exwm-randr--init): * exwm-workspace.el (exwm-workspace--init): Add certain frame parameters into `frameset-filter-alist' to prevent them from being saved/restored which makes little sense and is problematic.
2016-10-06 Avoid updating input focus when renaming buffersChris Feng1-3/+13
* exwm-workspace.el (exwm-workspace-switch-to-buffer) (exwm-workspace-rename-buffer): Do not update input focus.
2016-09-30 Use read-buffer-to-switch in exwm-workspace-switch-to-bufferFelix Lange1-1/+1
read-buffer-to-switch elides the current buffer from the list of completions and selects a sane default.
2016-09-23 Use X window bordersChris Feng1-6/+0
; This commit replaces the internal borders of Emacs frames with X ; window borders. This should make the flickering issue of floating X ; windows less serious. * exwm-floating.el (exwm-floating--border-pixel) (exwm-floating--border-colormap): New variables for storing border pixel and its colormap. (exwm-floating--set-floating): Do not set the internal border (and background color) of floating frames; do not take `exwm-floating-border-width' into account when calculating geometries; set the border of floating X window containers. (exwm-floating--unset-floating): No need to restore the position of X windows any more; hide the border of floating X window containers. (exwm-floating--init): Initialize the border pixel. * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): Show/Hide container border respectively. * exwm-manage.el (exwm-manage--manage-window): Set the border pixel and colormap of X window containers. * exwm-workspace.el (exwm-workspace-move-window): Do not set the internal border and background color of floating frames. * exwm.el (exwm--on-ClientMessage): Simplify the code for calculating _NET_REQUEST_FRAME_EXTENTS.
2016-08-31 Force using visible buffers in `other-buffer'Chris Feng1-1/+1
* exwm-floating.el (exwm-floating--set-floating): * exwm-workspace.el (exwm-workspace-move-window): Buffers visible on other frames should be treated as invisible. One side effect is visible buffers on the current frame is also taken into account.
2016-08-30 Improve exwm-workspace-move-window behavior in specific caseVed Vyas1-4/+3
This is a small change that improves the behavior of `exwm-workspace-move-window` in the following situation: 0. `exwm-workspace-show-all-buffers` and `exwm-layout-show-all-buffers` are `nil`*. 1. On active workspace `i`, there is X window `a` in the selected Emacs window. 2. On workspace `j`, there is X window `b` in the selected Emacs window on that workspace frame. 3. While workspace `i` is active, use `exwm-workspace-move-window` to move `a` to workspace `j`. 4. Switch to workspace `j` and use `exwm-workspace-move-window` to move `a` back to workspace `i`. Expected behavior: X window `a` is once again shown in the selected Emacs window on workspace `i` and X window `b` is once again shown in the selected Emacs window on workspace `j`. What is observed: `a` is OK but the selected Emacs window on workspace `j` does not show `b`. However, `b` is the first candidate when doing a `switch-to-buffer` in that Emacs window on workspace `j`. I'm not sure if this is the correct and complete change required, but it is working well so far. *The expected behavior is observed with EXWM 0.10 if exwm-{workspace,layout}-show-all-buffers are non-nil.
2016-08-15 Do not set _NET_WORKAREAChris Feng1-7/+2
* exwm-workspace.el (exwm-workspace--update-workareas): Do not set _NET_WORKAREA. * exwm.el (exwm--init-icccm-ewmh, exwm--exit-icccm-ewmh): Remove _NET_WORKAREA from the supported list.
2016-08-12 Fix _NET_DESKTOP_VIEWPORTChris Feng1-5/+0
* exwm-workspace.el (exwm-workspace--update-ewmh-props): * exwm.el (exwm--init-icccm-ewmh): Set _NET_DESKTOP_VIEWPORT on startup since it's a constant.
2016-08-12 Raise all docks/panels when switching workspaceChris Feng1-12/+13
* exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Always set the struts value, even it's nil. * exwm-workspace.el (exwm-workspace--update-struts): Check for nil struts values.
2016-08-12 Check for _NET_WM_STATE_FULLSCREEN on managingChris Feng1-4/+11
* exwm-core.el (exwm--fullscreen): Removed. (exwm--ewmh-state): New variable for recording the _NET_WM_STATE hint. * exwm-core.el (exwm-mode-menu, exwm-mode-map): * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): * exwm-manage.el (exwm-manage--unmanage-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 the new variable. * exwm-manage.el (exwm-manage--update-ewmh-state): New function for updating _NET_WM_STATE. (exwm-manage--manage-window): Update _NET_WM_STATE and check for _NET_WM_STATE_FULLSCREEN.
2016-08-12 Always put the desktop at bottomChris Feng1-3/+17
* exwm-manage.el (exwm-manage--desktop): New variable for recording the desktop X window. (exwm-manage--manage-window): Check for desktop. * exwm-workspace.el (exwm-workspace--resize-minibuffer-frame) (exwm-workspace--hide-minibuffer): Put the minibuffer container above desktop if any.
2016-08-12 Fix CreateWindow attributesChris Feng1-15/+34
; Also fix various compile warnings. * exwm-floating.el (exwm-floating--set-floating): * exwm-manage.el (exwm-manage--manage-window): * exwm-systemtray.el (exwm-systemtray--init): * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) (exwm-workspace--init): * exwm.el (exwm--init-icccm-ewmh): Explicitly specify the class (InputOutput or InputOnly) and for an InputOutput X window the background pixmap when creating an X window.
2016-08-09 Update timestamp for WM_TAKE_FOCUS ClientMessageChris Feng1-0/+9
* exwm-input.el (exwm-input--timestamp-window) (exwm-input--timestamp-atom, exwm-input--timestamp-callback): New variables for updating timestamp. (exwm-input--set-focus): Send WM_TAKE_FOCUS ClientMessage with updated timestamp. (exwm-input--update-timestamp): New utility function for fetching timestamp. (exwm-input--on-PropertyNotify): New function for handling PropertyNotify event to extract the timestamp. (exwm-input--init): Create resources for updating timestamp; attach the event listener. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): * exwm.el (exwm--on-PropertyNotify): No longer update timestamp. * exwm-input.el (exwm-input--set-focus): Avoid setting input focus on already focused X windows, or when the input focus in not on a Emacs frame if globally active model is in use. * exwm-floating.el (exwm-floating--set-floating): * exwm-workspace.el (exwm-workspace-move-window) (exwm-workspace--add-frame-as-workspace, exwm-workspace--init): Set 'exwm-id' frame parameter as the numerical (inner) frame X ID.
2016-08-01 Fix emacsclient issuesChris Feng1-26/+30
* exwm-workspace.el (exwm-workspace--client-p): New function for testing emacsclient frames. (exwm-workspace--update-minibuffer-height) (exwm-workspace--on-minibuffer-setup) (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) (exwm-workspace--on-echo-area-clear): * exwm-input.el (exwm-input--on-buffer-list-update) (exwm-input--on-minibuffer-setup): * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): Use it. * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Always clear the 'client' frame parameter. (exwm-workspace--init): Fix a typo.
2016-08-01 Fix restarting issuesChris Feng1-19/+36
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Prompt for unsaved files before restarting; avoid running `server-force-stop' early; restore the 'client' frame parameter before calling `exwm--exit'; correctly handle emacsclient. * exwm.el (exwm-restart): Always kill subordinate Emacs instances.
2016-07-31 ; Eliminate compile warningsChris Feng1-4/+9
2016-07-31 Fix restarting issuesChris Feng1-5/+10
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): * exwm.el (exwm-restart): Run `kill-emacs-hook' early; do not check for X windows before restarting.
2016-07-30 Add restart supportChris Feng1-33/+32
* exwm-input.el (exwm-input--exit): Cancel timers. * exwm-manage.el (exwm-manage--manage-window): Add reparented X windows to save-set. * exwm-systemtray.el (exwm-systemtray--embed): Add embeded icons to save-set. * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): No need to unmanage; also hide Emacs frames; always call `exwm--exit'. * exwm.el (exwm-restart): New command for restarting EXWM. (exwm--exit-icccm-ewmh): New function for cleaning up ICCCM/EWMH properties. (exwm-exit-hook): Update doc string. (exwm--exit): Call `exwm--exit-icccm-ewmh' and do not reset variables.
2016-07-30 ; * exwm-workspace.el (exwm-workspace-switch): Input focus should be setChris Feng1-1/+1
; on the frame where the target window resides.
2016-07-30 set fullscreen-frame-count to 0 on exitingTaichi Uemura1-0/+1
2016-07-30 Fit the *Completions* bufferChris Feng1-1/+11
* exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Work around the *Completions* buffer not getting fitted problem. * exwm.el (exwm-enable): Enable `window-resize-pixelwise'.
2016-07-30 Fix input focus transfer between workspacesChris Feng1-13/+0
* exwm-input.el (exwm-input--set-focus): Make input focus revert to parent by default (to prevent input focus from following pointer). * exwm-input.el (exwm-input--update-focus): Switch to another workspace if input focus is transfered to it. * exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init) (exwm-workspace--exit): Remove `exwm-workspace--on-focus-in' and related uses.
2016-07-26 Always update input focus on entering minibufferChris Feng1-3/+1
* exwm-input.el (exwm-input--on-minibuffer-setup): New function for setting input focus on the workspace frame. (exwm-input--init): Add the function to `minibuffer-setup-hook'. * exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Avoid setting input focus here.
2016-07-25 Minor fixes for past few commitsChris Feng1-4/+3
* exwm-input.el (exwm-input--unread-event): Temporarily disable it due to bug#23980. * exwm-workspace.el (exwm-workspace--init): Set the default frame internal border to 0. * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Fix a typo.