about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2023-10-06 Merge branch 'arnebab.github.com/master' into externals/exwmAdrián Medraño Calvo1-2/+20
2023-10-06 Bump version to 0.28Adrián Medraño Calvo1-1/+1
2023-09-11 Catch and report all errors raised when invoking command hooksDavid Wilson1-2/+20
* exwm-input.el (exwm-input--fake-last-command): Catch and report all errors raised when invoking `pre-command-hook' and `post-command-hook'. Copyright-paperwork-exempt: yes
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 Declare external functionAdrián Medraño Calvo2-0/+4
* exwm.el: * exwm-randr.el: Declare `x-get-atom-name' function.
2023-08-18 Fix bytecompiler warnings, improve docstringsAdrián Medraño Calvo8-99/+198
* 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 Fix layout being refreshed too often on minibuffer setupAdrián Medraño Calvo1-2/+2
The guard clause was refacored incorrectly, leading to it having no effect on the intended forms. * exwm-layout.el (exwm-layout--on-minibuffer-setup): Guard `exwm-layout--refresh' again.
2023-08-18 Convert `lsh' to `ash'Adrián Medraño Calvo1-3/+3
The former is deprecated. The behavioural difference between those functions does not impact us here, because the numbers returned by `x-color-values' are natural. * exwm-core.el (exwm--color->pixel): Convert `lsh' to `ash'.
2023-08-18 Update copyright year to 2023Adrián Medraño Calvo13-13/+13
2023-08-18 Declare defsubst indentationAdrián Medraño Calvo3-2/+8
* 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 Calvo4-113/+113
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 Calvo4-118/+114
* 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-14 Merge branch 'nbarrientos.github.com/ib_exwm_conn_nil' into externals/exwmAdrián Medraño Calvo7-69/+83
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 Merge branch 'nbarrientos.github.com/post-command-hook' into externals/exwmAdrián Medraño Calvo1-3/+6
2023-06-09 Observe connection status on deinitializationAdrián Medraño Calvo7-64/+77
* 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.
2023-06-09 Make sure the buffer that generates the event is currentNacho Barrientos1-3/+6
* exwm-input.el (exwm-input--on-ButtonPress): Set current buffer when running pre- and post-command hooks.
2023-06-09 Don't assume that exwm--connection is non-nilNacho Barrientos1-6/+7
`exwm-input--exit` could be called (via `exwm-exit`) from `exwm-init` in case of error when initialising EXWM. It could happen that the bit that failed when exwm-init is executed was the call to `xcb:connect`, hence `exwm--connection` would be nil when errors are handled (and `exwm-exit` is called). Without this patch, in the case above, the user will see a crash as there's no method allowing a nil XCB connection object: Debugger entered--Lisp error: (cl-no-applicable-method xcb:-+request nil #<xcb:SetInputFocus ... even worse, not even giving the chance to the `warn` call in `exwm-init`'s error handler to actually inform the user about the actual problem ("[XELB] Connection timeout", for instance). * exwm-input.el (exwm-input--exit): Check `exwm--connection' is set before trying to send requests.
2022-11-22 Use `active-minibuffer-window' rather than `minibuffer-window'Adrián Medraño Calvo1-8/+9
* exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): Use `active-minibuffer-window`, instead of the minibuffer window of selected frame, as there's no guarantee that the selected frame is the frame containing the minibuffer. Also make sure the frame is an EXWM workspace.
2022-11-22 Merge branch 'drop-client-p' into externals/exwmAdrián Medraño Calvo5-150/+143
2022-11-22 Merge branch 'stebalien.github.com/fix/systemtray-height' into externals/exwmAdrián Medraño Calvo1-1/+2
2022-11-22 Reduce logging verbosityAdrián Medraño Calvo1-2/+2
* exwm-input.el (exwm-input--on-echo-area-dirty) (exwm-input--on-echo-area-clear): Reduce logging verbosity.
2022-11-22 Pick the correct line height for the systemtraySteven Allen1-1/+2
* exwm-systemtray.el (exwm-systemtray--init): Use the line-height of the minibuffer-window, not that of the selected one.
2022-11-22 Merge branch 'stebalien.github.com/feat/background' into externals/exwmAdrián Medraño Calvo2-2/+203
2022-11-22 Add a module for setting the X backgroundSteven Allen2-2/+203
When enabled, EXWM will automatically set the background color either the user-specified color, or theme's default background color. This will even work with compositors such as picom. * background.el: add it. * exwm-core (exwm--intern-atom): optionally take a conn.
2022-11-11 Bump version to 0.27Adrián Medraño Calvo1-1/+1
2022-11-09 Default exwm-systemtray color to `workspace-background'Adrián Medraño Calvo1-4/+1
* exwm-systemtray.el (exwm-systemtray-background-color): Change default to `workspace-background', as it's supported in all configurations.
2022-11-09 Refresh the tray icon background when updating the background colorSteven Allen1-4/+14
* exwm-systemtray.el (exwm-systemtray--refresh-background-color): Add optional parameter REMAP to force redrawing of the background. (exwm-systemtray--on-theme-change): Use it.
2022-11-09 * exwm-systemtray.el (exwm-systemtray--on-theme-change): Add missing parameter.Steven Allen1-1/+1
2022-11-09 * exwm-systemtray.el (exwm-systemtray--init): Set EWMH window type to dock.Adrián Medraño Calvo1-1/+7
2022-11-09 Support setting system tray background color to current workspace'sAdrián Medraño Calvo1-7/+27
* exwm-systemtray.el (exwm-systemtray-background-color): Add support for using current workspace's background color as system tray background color. (exwm-systemtray--refresh-background-color): New function to set the background color upon theme changes or workspace switches. (exwm-systemtray--on-workspace-switch) (exwm-systemtray--on-theme-change): Use it. (exwm-systemtray--init): React to theme changes.
2022-11-04 Use default visual, depth and colormap in systray embedder windowAdrián Medraño Calvo1-43/+116
We were using the Emacs' frame's depth, but not the visual nor colormap. This failed with Emacs 29 and its support for 32-bit depths. We now use the default screen's visual: using a non-default visual in the system tray requires support for embedding icons with different visuals, which is not implemented. We restrict our limited transparency support to Emacs frames with depth equal to the default visual's detph. * exwm-core.el (exwm--get-visual-depth-colormap): New function. * exwm-systemtray.el (exwm-systemtray--init): Use root window's visual, depth and colormap. Reset all attributes that refer (perhaps due to defaults) to the parent window, as it might have a different visual, depth or colormap. (exwm-systemtray--init): Set _NET_SYSTEM_TRAY_VISUAL. (exwm-systemtray-background-color): Emit a warning when transparency is selected but not supported. (exwm-systemtray--set-background-color): New function to set embedder window background. (exwm-systemtray--embedder-window-depth): Add variable. (exwm-systemtray--transparency-supported-p): New function to check whether transparency is supported.
2022-10-29 Merge branch 'j4m3s-s.github.com/master' into externals/exwmAdrián Medraño Calvo1-1/+1
2022-10-29 Merge branch 'mgi.github.com/mgi/fix' into externals/exwmAdrián Medraño Calvo1-4/+9
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-10-29 Merge branch 'stebalien.github.com/fix/hide-floating-tabs' into externals/exwmAdrián Medraño Calvo1-0/+2
2022-10-29 Focus workspace frames upon _NET_ACTIVE_WINDOWManuel Giraud1-4/+9
* exwm.el (exwm--on-ClientMessage): Take care of focusing workspace frames when a _NET_ACTIVE_WINDOW message is received for a workspace frame. This is responsibility of the window manager when it advertises _NET_ACTIVE_WINDOW support, which we do. Emacs versions before 29 took care of setting the input focus to the frame. Thanks-to: Po Lu for the work on Emacs and assistance with this issue.
2022-07-26 Hide tab-bar on floating windowsSteven Allen1-0/+2
Floating windows are dedicated to a specific buffer anyways. * exwm-floating.el (exwm-floating--set-floating): Hide the tab bar.
2022-03-24 Use 32-bit visual for frame containersAdrián Medraño Calvo2-4/+32
* 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-10 Add license fileAdrián Medraño Calvo1-0/+674
* LICENSE: Add file.
2022-02-01 Check EXWM terminal instead of client or graphical framesAdrián Medraño Calvo5-61/+59
* 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 Improve confirmation promptsAdrián Medraño Calvo1-2/+2
* exwm.el (exwm-restart, exwm--confirm-kill-emacs): Improve confirmation prompts.
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 Calvo3-25/+63
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 Calvo2-24/+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-10 Bump version to 0.26Adrián Medraño Calvo1-1/+1