about summary refs log tree commit diff
path: root/exwm-workspace.el
AgeCommit message (Collapse)AuthorFilesLines
2024-01-13 Drop :version keywords from defgroupDaniel Mendler1-1/+0
These may refer to an Emacs version and may have been added by mistake.
2024-01-08 Update copyright year to 2024Adrián Medraño Calvo1-1/+1
2023-09-10 Fix workspace height unsharing workarea valueAdrián Medraño Calvo1-16/+18
* exwm-workspace.el (exwm-workspace--update-workareas): Clone the value of the `exwm-geometry' frame parameter before modifying it for calculating workareas. (exwm-workspace--update-workareas): Simplify `pcase' patterns.
2023-08-18 Fix bytecompiler warnings, improve docstringsAdrián Medraño Calvo1-24/+37
* exwm-core.el: * exwm-input.el: * exwm-layout.el: * exwm-manage.el: * exwm-systemtray.el: * exwm-workspace.el: * exwm-xim.el: Improve docstrings. * exwm-xim.el (cl-lib): Require `cl-lib' at runtime for `cl-position'. * exwm-core.el (exwm-debug): Specify custom's group. * exwm-systemtray.el (xcb:systemtray:-ClientMessage): Quote `:initform''s argument.
2023-08-18 Update copyright year to 2023Adrián Medraño Calvo1-1/+1
2023-08-18 Declare defsubst indentationAdrián Medraño Calvo1-2/+3
* exwm-core.el (exwm--id->buffer, exwm--buffer->id, exwm--terminal-p): * exwm-input.el (exwm-input--unread-event): * exwm-workspace.el (exwm-workspace--position) (exwm-workspace--workspace-p): Declare indentation.
2023-08-18 Merge branch 'jollm.github.com/ignore-struts-top-bottom' into externals/exwmAdrián Medraño Calvo1-87/+94
2023-08-18 Selectively ignore left & right struts in horizontally aligned monitorsAdrián Medraño Calvo1-7/+6
* exwm-workspace.el (exwm-workspace--update-workareas): Simplify cross-monitor strut conditionals and apply them to horizontally aligned monitors.
2023-08-18 Convert `delta' to the size the strut occupies in the workareaAdrián Medraño Calvo1-12/+12
* exwm-workspace.el (exwm-workspace--update-workareas): Repurpose `delta' to be the positive size occupied by the strut in the workarea.
2023-08-18 Convert `exwm-workspace--workareas' to a list of `xcb:RECTANGLE'sAdrián Medraño Calvo1-92/+95
* exwm-workspace.el (exwm-workspace--set-fullscreen) (exwm-workspace--resize-minibuffer-frame) (exwm-workspace--on-ConfigureNotify): * exwm-floating.el (exwm-floating--set-floating): * exwm-manage.el (exwm-manage--manage-window): * exwm-systemtray.el (exwm-systemtray--refresh) (exwm-systemtray--on-workspace-switch) (exwm-systemtray--refresh-all, exwm-systemtray--init): Adjust to `xcb:RECTANGLE' workarea.
2023-06-09 More selectively ignore top and bottom strutsFran Ley1-2/+7
For the case of vertical columns of workareas, top and bottom struts should only apply to workareas containing the respective edge of the strut offset. To simplify, imagine three monitors arranged vertically and one workarea per display: +-------+ | 1 | 2000x1000 px +-------+ | 2 | 2000x1000 px +-------+ | 3 | 2000x1000 px +-------+ In sexp form: ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 1000)) where each element represents a workarea as x, y, width, height And example struts of the form (offset-type offset (x-start x-end)) a.) (top 42 (0 2000)) b.) (top 1042 (0 2000)) c.) (top 2042 (0 2000)) d.) (bottom 42 (0 2000)) e.) (bottom 1042 (0 2000)) f.) (bottom 2042 (0 2000)) Workareas adjusted for struts before this change: a.) ((0 42 2000 958) (0 1000 2000 1000) (0 2000 2000 1000)) b.) ((0 1042 2000 -42) (0 1042 2000 958) (0 2000 2000 1000)) c.) ((0 2042 2000 -1042) (0 2042 2000 -42) (0 2042 2000 958)) d.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 902)) e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 -98)) f.) ((0 0 2000 902) (0 1000 2000 -98) (0 2000 2000 -1098)) Note that a. and d. are sensible, while b., c., e., and f. are quite user unfriendly. After this change, the same adjusted workareas are: a.) no change b.) ((0 0 2000 1000) (0 1042 2000 958) (0 2000 2000 1000)) c.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2042 2000 958)) d.) no change e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 1000)) f.) ((0 0 2000 902) (0 1000 2000 1000) (0 2000 2000 1000)) The intent is to allow dock type windows such as typical status bars to occupy space in a workarea on any of a set of vertically arranged displays without occluding the other workareas due to the limitations of the X spec regarding strut offsets. Note that this behaviour conflicts with EWMH 1.3: > Struts MUST be specified in root window coordinates, that is, they are *not* relative to the edges of any view port or Xinerama monitor. but is accepted by multiple WMs. See: - https://blog.martin-graesslin.com/blog/2016/08/panels-on-shared-screen-edges/ - https://mail.gnome.org/archives/wm-spec-list/2009-November/msg00005.html - https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/22 * exwm-workspace.el (exwm-workspace--update-workareas): Assume vertical struts apply from the monitor boundary when they cross them. Copyright-paperwork-exempt: yes
2023-06-09 Observe connection status on deinitializationAdrián Medraño Calvo1-37/+44
* exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Add optional argument quit. * exwm-background.el (exwm-background--exit): * exwm-input.el (exwm-input--exit): * exwm-manage.el (exwm-manage--unmanage-window): * exwm-systemtray.el (exwm-systemtray--exit): * exwm-workspace.el (exwm-workspace--exit-minibuffer-frame) (exwm-workspace--exit): * exwm-xim.el (exwm-xim--exit): Observe connection status when deinitializing in order to support deinitializing when the connection breaks.
2022-11-22 Merge branch 'drop-client-p' into externals/exwmAdrián Medraño Calvo1-112/+71
2022-10-29 Fix logging order in exwm-workspace--set-activeJames1-1/+1
* exwm-workspace.el (exwm-workspace--set-active): Swap logging arguments to match message. Copyright-paperwork-exempt: yes
2022-03-24 Use 32-bit visual for frame containersAdrián Medraño Calvo1-4/+17
* exwm-core.el (exwm--get-visual-depth-colormap): New function. * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Use Emacs' frame's visual, depth and colormap. Reset all attributes that refer (also by default) to the parent window (the root window), as it might have a different visual, depth or colormap. Special-thanks-to: Elijah Malaby <qwe12345678910@gmail.com> for figuring out the changes needed to suport 32-bit visuals and proposing the initial version of this improvement.
2022-02-10 Set WM_STATE on emacs framesElijah Malaby1-0/+5
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Set WM_STATE. Copyright-paperwork-exempt: yes
2022-02-01 Check EXWM terminal instead of client or graphical framesAdrián Medraño Calvo1-24/+12
* exwm-core.el (exwm--terminal-p): Add function. * exwm.el (exwm--confirm-kill-terminal): Use it. * exwm-input.el (exwm-input--on-buffer-list-update): Use it. (exwm-input--on-minibuffer-setup) (exwm-input--on-minibuffer-exit): Use it. (exwm-input--on-minibuffer-exit): Use the minibuffer's selected window's frame or selected frame instead of current workspace. (exwm-input--on-echo-area-dirty): Removed test, as it's checked in `exwm-input--on-minibuffer-setup'. * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): Use it. (exwm-layout--on-echo-area-change): Refresh layout the frame of selected window's minibuffer if it's an EXWM frame. * exwm-workspace.el (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-workspace--on-delete-frame): Use it. * exwm-workspace.el (exwm-workspace--client-p-hash-table): Remove variable. (exwm-workspace--client-p): Remove function.
2021-12-09 Leave `client' frame parameter in placeAdrián Medraño Calvo1-40/+7
EXWM removed the `client' frame parameter from workspace frames, perhaps in order to lead Emacs to ask for confirmation before quitting. This change leaves the `client' frame parameter in place. Emacs no longer asks for confirmation when killing the emacsclient session. A followup commit will correct this. * exwm-workspace.el (exwm-workspace--add-frame-as-workspace) (exwm-workspace--init-minibuffer-frame, exwm-workspace--init) (exwm-workspace--exit, exwm-workspace--post-init): Remove special handling for `client' frames. They become workspaces just like any other frame.
2021-12-09 Support for killing the X terminalAdrián Medraño Calvo1-24/+37
Check whether frames are alive upon teardown, as it might not be the case when the terminal is killed as `delete-terminal-functions' might be invoked after the terminal is deleted. * exwm-core.el (exwm--terminal): New variable holding the terminal EXWM runs under. (exwm-init, exwm-exit): Set and unset it. * exwm.el (exwm--on-delete-terminal): New function for exiting EXWM when the terminal is deleted. (exwm-init): Use it. * exwm.el (exwm--confirm-kill-terminal, exwm-init): Ask for confirmation before deleting terminal. * exwm-workspace.el (exwm-workspace--fullscreen-workspace): New function. Ensure the frame is alive. (exwm-workspace--add-frame-as-workspace): Use it. (exwm-workspace--exit-minibuffer-frame): Cancel `exwm-workspace--display-echo-area-timer'. (exwm-workspace--exit-minibuffer-frame): Ensure the minibuffer frame is alive. (exwm-workspace--exit): Ignore dead workspace frames.
2021-12-09 Refactor re-creation of last frameAdrián Medraño Calvo1-8/+7
* exwm-workspace.el (exwm-workspace--get-next-workspace): Return nil when there's only one frame. (exwm-workspace--on-delete-frame) (exwm-workspace--remove-frame-as-workspace): Create a workspace when removing the last one, for X windows to be moved to.
2021-12-09 Refactor `exwm-workspace--get-remove-frame-next-workspace'Adrián Medraño Calvo1-23/+15
* exwm-workspace.el (exwm-workspace--prompt-delete) (exwm-workspace--set-desktop): Stop explicitly moving X windows to other workspace; dealt with by `exwm-workspace--remove-frame-as-workspace'. (exwm-workspace--get-remove-frame-next-workspace): Remove function. Refactored into `exwm-workspace--get-next-workspace' and `exwm-workspace--remove-frame-as-workspace'. (exwm-workspace--get-next-workspace): Add function. (exwm-workspace--remove-frame-as-workspace): Move X windows to next workspace.
2021-11-02 Correct wrong variable nameAdrián Medraño Calvo1-1/+1
* exwm-workspace.el (exwm-workspace--on-delete-frame): Correct misstyped name of variable `exwm-workspace--client-p-hash-table'.
2021-10-30 Merge branch 'mattbeshara.github.com/less-consy-workspace--client-p' into ↵Adrián Medraño Calvo1-3/+15
externals/exwm
2021-10-29 Update copyright year to 2021Adrián Medraño Calvo1-1/+1
2021-10-25 Explicitly remove workspace frames from client-p cache when deletedMatt Beshara1-1/+2
* exwm-workspace.el (exwm-workspace--on-delete-frame): Clean up hash table entries upon removing a workspace.
2021-10-25 Rename variable using ‘exwm-workspace’ package prefix; add docstringMatt Beshara1-4/+6
* exwm-workspace.el (exwm-workspace--client-p-hash-table): Rename `exwm--client-p-hash-table'.
2021-10-25 Use a hash table to cache result of ‘exwm-workspace--client-p’Matt Beshara1-2/+11
* exwm-workspace.el (exwm--client-p-hash-table): New variable. (exwm-workspace--client-p): Use `exwm--client-p-hash-table' to store which workspace frames are client frames instead of frequently invoking `frame-parameter'.
2020-05-06 Prevent jumping back to previous workspaceAdrián Medraño Calvo1-5/+5
* exwm-workspace.el (exwm-workspace-switch): Focus out old frame before switching to the new one to prevent jumping back to previous workspace.
2020-04-15 Stop aborting recursive edit upon switching workspaces.Adrián Medraño Calvo1-10/+0
* exwm-workspace.el (exwm-workspace-switch): Stop aborting recursive edit upon switching workspaces. Users should handle it just like in regular Emacs (possibly customizing `enable-recursive-minibuffers').
2020-04-15 Abort recursive edit before switching workspacesAdrián Medraño Calvo1-6/+10
* exwm-workspace.el (exwm-workspace-switch): Abort recursive edit before switching to other workspace. This avoids the usual `set-window-configuration' calls (e.g., by `eval-expression') to switch *us back to the previous workspace.
2020-02-02 Update copyright year to 2020Chris Feng1-1/+1
2019-12-08 Eliminate a compile warningChris Feng1-1/+1
* exwm-workspace.el (exwm-workspace-move-window): Replace the obsolete `run-window-configuration-change-hook'.
2019-10-02 Fix detection of `exwm-workspace--window-y-offset'Chris Feng1-4/+10
* exwm-workspace.el (exwm-workspace--update-offsets): Explicitly request the geometry of the container for the first workspace as it may not align with the top of the root X window.
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.