about summary refs log tree commit diff
path: root/exwm-workspace.el
AgeCommit message (Collapse)AuthorFilesLines
2019-10-02 Avoid calling `x-focus-frame' on non-graphical framesChris Feng1-1/+2
* exwm-workspace.el (exwm-workspace--client-p): Also account for non-graphical frames. * exwm-input.el (exwm-input--on-minibuffer-setup) (exwm-input--on-minibuffer-exit): Exclude emacsclient frames.
2019-09-14 Replace `frame-geometry'Chris Feng1-0/+27
* exwm-workspace.el (exwm-workspace--frame-y-offset) exwm-workspace--window-y-offset, exwm-workspace--update-offsets): New variables & function for the calculation of Emacs frame offsets, as `frame-geometry' is not available in Emacs 24. * exwm-floating.el (exwm-floating--set-floating) (exwm-floating--do-moveresize): * exwm-layout.el (exwm-layout--show): * exwm-systemtray.el (exwm-systemtray--on-workspace-switch) (exwm-systemtray--on-randr-refresh, exwm-systemtray--init): Use them. * exwm-systemtray.el (exwm-systemtray--refresh-all): Renamed from `exwm-systemtray--on-randr-refresh'. (exwm-systemtray--init, exwm-systemtray--exit): Use it. * exwm-floating.el (exwm-floating--stop-moveresize): Send a ConfigureNotify event to floating frame to update its position (seems required by Emacs 24).
2019-09-13 Improve user optionsChris Feng1-1/+3
* exwm-floating.el (exwm-floating-border-color) (exwm-floating-border-width): Make changes take effect w/o restart. (exwm-floating--init-border): Refactored out from `exwm-floating--init'. * exwm-workspace.el (exwm-workspace-minibuffer-position): Clarify a restart is required.
2019-09-08 ; Improve messages for automatically created workspacesChris Feng1-2/+4
2019-08-25 Ignore non-`exwm-mode' buffers in `exwm-workspace-move-window'Chris Feng1-1/+3
* exwm-workspace.el (exwm-workspace-move-window): Ignore non-`exwm-mode' buffers.
2019-08-11 Inform user about making a frame a workspaceChris Feng1-2/+4
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Add a message. (exwm-workspace--init): Exclude initial workspaces.
2019-07-28 Fix `after-focus-change-function' not workingChris Feng1-2/+8
* exwm-workspace.el (exwm-workspace--original-handle-focus-in) (exwm-workspace--original-handle-focus-out): Store the original `handle-focus-{in,out}'. (exwm-workspace-switch): Now that `handle-focus-{in,out}' has been updated to call other stuffs like `after-focus-change-function', we can no longer run `focus-{in,out}-hook' only.
2019-06-30 Fix 'Attempt to delete a surrogate minibuffer frame' errorChris Feng1-12/+24
* exwm-workspace.el (exwm-workspace--get-remove-frame-next-workspace): New function automatically moves X window elsewhere before removing a workspace; also returns the destination workspace. (exwm-workspace--prompt-delete, exwm-workspace-delete) (exwm-workspace--remove-frame-as-workspace): Use it. * exwm.el (exwm--on-ClientMessage): Use it.
2019-03-17 * exwm-workspace.el: Use closures rather than `(lambda ...)Stefan Monnier1-9/+9
2019-03-17 Add extra keys for selecting workspaceChris Feng1-3/+17
* exwm-workspace.el (exwm-workspace--switch-map) (exwm-workspace--init): Avoid initializing the keymap when loading. (exwm-workspace--init-switch-map): Initialize `exwm-workspace--switch-map' and also add extra keybindings when `exwm-workspace-index-map' has been customized.
2019-02-06 Merge branch 'retain-echo-area-until-input' of ↵Chris Feng1-1/+19
https://github.com/medranocalvo/exwm into medranocalvo/retain-echo-area-until-input
2019-02-01 Update copyright year to 2019Chris Feng1-1/+1
2018-12-02 ; Improve debug logs.Chris Feng1-2/+29
2018-11-04 Add support for RandR 1.5 monitorChris Feng1-9/+9
* exwm-randr.el (exwm-randr-workspace-monitor-plist): New user option for specifying which monitor each workspace should be displayed on. (exwm-randr-workspace-monitor-plist): Made obsolete. (exwm-randr--get-monitors): New function for fetching active monitors. (exwm-randr--refresh): Adapted to use monitor. (exwm-randr--init): Now requires RandR 1.5. * exwm-randr.el: * exwm-workspace.el: Rename `output' to `monitor'.
2018-11-03 Hide minibuffer upon receiving any eventAdrián Medraño Calvo1-0/+7
* exwm-input.el (exwm-input--event-hook): New variable. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): Run `exwm-input--event-hook'. * exwm-workspace.el (exwm-workspace--init, exwm-workspace--exit): Hide minibuffer upon noticing an event.
2018-11-03 Stop hiding the minibuffer when a message is being displayedAdrián Medraño Calvo1-1/+12
* exwm-workspace.el (exwm-workspace--echo-area-maybe-clear): New function that postpones hiding the minibuffer when it's displaying a message. (exwm-workspace--on-echo-area-dirty): Use it.
2018-10-21 Fix single workspace invisible problem with XephyrChris Feng1-3/+5
* exwm-workspace.el (exwm-workspace-switch): On startup EXWM switches to workspace 0 by force so the rest code can not assume the frames before and after a switch different.
2018-10-08 Reduce flicker when switching workspacesAdrián Medraño Calvo1-1/+1
* exwm-workspace.el (exwm-workspace-switch): Hide the old workspace after having shown the new one when switching to avoid flicker.
2018-09-02 Explicitly specify frame for cursor warping conditionalJames Ferguson1-1/+1
2018-09-02 Fix cursor warping conditional for cursor left of frameJames Ferguson1-1/+3
2018-08-30 Refresh layout after activating/deactivating workspacesAdrián Medraño Calvo1-2/+3
* exwm-workspace.el (exwm-workspace--set-active): Refresh layout after activating or deactivating workspaces. * exwm-layout.el (exwm-layout--refresh-workspace): Hide X windows on inactive workspaces.
2018-08-13 Trace more functionsAdrián Medraño Calvo1-0/+7
2018-08-12 Avoid using `set-mouse-position' to warp pointerChris Feng1-3/+12
* exwm-workspace.el (exwm-workspace-switch): Warp pointer with the WarpPointer request.
2018-07-15 ; Use `derived-mode-p'.Chris Feng1-4/+4
2018-07-15 Add support for automatic cursor warpingChris Feng1-0/+15
* exwm-workspace.el (exwm-workspace-warp-cursor): New user option. (exwm-workspace-switch): Automatically warp cursor after workspace switch.
2018-03-09 Minor fixesChris Feng1-17/+14
2018-03-06 Name all helper windows created by EXWMAdrián Medraño Calvo1-12/+10
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace) (exwm-workspace--init): * exwm-input.el (exwm-input--init): * exwm-floating.el (exwm-floating--set-floating): Name created helper windows with prefix "EXWM".
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'