Commit graph

144 commits

Author SHA1 Message Date
Adrián Medraño Calvo
92fbafee6c Update copyright year to 2024 2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
86f43494eb Bump version to 0.28 2023-10-06 00:00:00 +00:00
Adrián Medraño Calvo
381637aa1c Declare external function
* exwm.el:
* exwm-randr.el: Declare `x-get-atom-name' function.
2023-08-18 00:00:00 +00:00
Adrián Medraño Calvo
d3567a8c7f Fix bytecompiler warnings, improve docstrings
* 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 00:00:00 +00:00
Adrián Medraño Calvo
612e64bf9b Update copyright year to 2023 2023-08-18 00:00:00 +00:00
Adrián Medraño Calvo
7318f857f2 Observe connection status on deinitialization
* 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 00:00:00 +00:00
Adrián Medraño Calvo
1c706daeb0 Merge branch 'drop-client-p' into externals/exwm 2022-11-22 00:00:00 +00:00
Adrián Medraño Calvo
e9cc0962cc Bump version to 0.27 2022-11-11 00:00:00 +00:00
Manuel Giraud
ce2191c444 Focus workspace frames upon _NET_ACTIVE_WINDOW
* 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-10-29 00:00:00 +00:00
Adrián Medraño Calvo
d6f62ff55a Check EXWM terminal instead of client or graphical frames
* 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.
2022-02-01 00:00:00 +00:00
Adrián Medraño Calvo
d4a7d16676 Improve confirmation prompts
* exwm.el (exwm-restart, exwm--confirm-kill-emacs): Improve
confirmation prompts.
2021-12-09 00:00:00 +00:00
Adrián Medraño Calvo
1aa4ca781d Support for killing the X terminal
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 00:00:00 +00:00
Adrián Medraño Calvo
62ffde76aa Refactor `exwm-workspace--get-remove-frame-next-workspace'
* 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-12-09 00:00:00 +00:00
Adrián Medraño Calvo
10bd12234e Bump version to 0.26 2021-11-10 00:00:00 +00:00
Adrián Medraño Calvo
deabe9c2df Bump version to 0.25 2021-10-30 00:00:00 +00:00
Adrián Medraño Calvo
c1206ac665 Update copyright year to 2021 2021-10-29 00:00:00 +00:00
Adrián Medraño Calvo
835a7add7c New maintainer 2021-10-29 00:00:00 +00:00
Chris Feng
9f28621277 Bump version to 0.24 2020-05-24 00:00:00 +00:00
Chris Feng
624a30212c Clarify the use of `exwm-config-default'
* exwm-config.el (exwm-config-example): Renamed from
`exwm-config-default' to make it clear it's just an example.
2020-05-10 00:00:00 +00:00
Adrián Medraño Calvo
007916c647 Fix window manager name
* exwm.el (exwm--init-icccm-ewmh): Correct _NET_WM_NAME to the
	name of the window manager on the _NET_SUPPORTING_WM_CHECK.
2020-04-15 00:00:00 +00:00
Chris Feng
3dbf1b1bed Add support for _NET_WM_STATE_HIDDEN
* exwm-layout.el (exwm-layout--set-ewmh-state): New function for
setting _NET_WM_STATE (according to local state).
* exwm.el (exwm--init-icccm-ewmh): Declare the support for this atom.
2020-03-29 00:00:00 +00:00
Chris Feng
27a884e947 Update copyright year to 2020 2020-02-02 00:00:00 +00:00
Chris Feng
65ec749bb0 Fix moving Emacs frames
* exwm.el (exwm--on-ClientMessage): Avoid moving workspace frames;
Move floating X window when trying to move the floating frame.
2019-12-15 00:00:00 +00:00
Chris Feng
2005fa5c5d Make _NET_ACTIVE_WINDOW working for floating X windows
* exwm.el (exwm--on-ClientMessage): Select floating frames for
floating X windows on receiving _NET_ACTIVE_WINDOW.
2019-09-22 00:00:00 +00:00
Chris Feng
559e56f473 Bump version to 0.23 2019-09-14 00:00:00 +00:00
Chris Feng
10766e232b Support starting EXWM from Emacs server not in daemon mode
* exwm.el (exwm-enable): Start EXWM from `window-setup-hook' or
`after-make-frame-functions', whichever comes first.
2019-09-14 00:00:00 +00:00
Chris Feng
cb9607814f ; Autoload `exwm-enable' 2019-09-08 00:00:00 +00:00
Chris Feng
5505cff826 Fix a lock issue with _NET_CLOSE_WINDOW and WM_DELETE_WINDOW
* exwm.el (exwm--on-ClientMessage): Calling `kill-buffer' directly
from an event context won't work since the DestroyNotify event for a
WM_DELETE_WINDOW request won't be handled until the current event
context terminates.

* exwm-manage.el (exwm-manage--kill-buffer-query-function): Avoid
potential side effects with MapWindow.
2019-08-25 00:00:00 +00:00
Chris Feng
fe8ee3c578 Fix 'Attempt to delete a surrogate minibuffer frame' error
* 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-06-30 00:00:00 +00:00
Chris Feng
605b0a9575 Allow panel to hide floating X windows
* exwm.el (exwm--on-ClientMessage): Use `exwm-floating-hide' to hide X
windows on receiving `WM_CHANGE_STATE' events.
2019-06-16 00:00:00 +00:00
Chris Feng
b12c67de2e Make replacing existing WM optional
* exwm.el (exwm-replace): New user option for specifying whether to
replace existing WM.
(exwm-init): Use it.
(exwm--wmsn-acquire, exwm-init): Do not print warning message when
user gives up replacing.
* exwm-core.el (exwm--wmsn-replace): Remove dead code.
2019-03-10 00:00:00 +00:00
Chris Feng
88c690217a Bump version to 0.22.1 2019-02-16 00:00:00 +00:00
Chris Feng
b1f74203be Bump version to 0.22 2019-02-10 00:00:00 +00:00
Chris Feng
44629818ba Scan for existing X windows only after running `exwm-init-hook'
* exwm.el (exwm-init): Delay the call to `exwm-manage--scan' since
managing existing X windows too early may result in issues like losing
input focus.
2019-02-05 00:00:00 +00:00
Chris Feng
993ca8a13a Update copyright year to 2019 2019-02-01 00:00:00 +00:00
Chris Feng
58f7916619 ; Improve debug logs. 2018-12-02 00:00:00 +00:00
Chris Feng
fe8274ca7e Bump version to 0.21 2018-12-01 00:00:00 +00:00
Chris Feng
5fde63cc45 Avoid activating already active X windows
* exwm.el (exwm--on-ClientMessage): On receiving `_NET_ACTIVE_WINDOW'
events, check if the requested X windows are already active.
2018-11-18 00:00:00 +00:00
Chris Feng
449cd9d379 Bump version to 0.20 2018-10-14 00:00:00 +00:00
Chris Feng
be10e261cc Merge branch 'medranocalvo/exwm-log-buffer' into externals/exwm 2018-08-19 00:00:00 +00:00
Adrián Medraño Calvo
29f2289a75 Consistently name helper windows
* exwm.el (exwm--init-icccm-ewmh): Avoid naming the root window.
(exwm--wmsn-acquire): Use the symbol name in the window name.
* exwm-systemtray.el (exwm-systemtray--embedder-window): Rename
`exwm-systemtray--embedder' consistency.
(exwm-systemtray--init):  Use symbol names in the window name.
2018-08-19 00:00:00 +00:00
Adrián Medraño Calvo
33dec8d1a3 Trace more functions 2018-08-13 12:00:00 +00:00
Chris Feng
7e5750392c Bump version to 0.19 2018-07-18 00:00:00 +08:00
Chris Feng
bc5f0b3ffa ; Use `derived-mode-p'. 2018-07-15 00:00:00 +08:00
Paul Eggert
ff4ae82fd7 Port to 32-bit Emacs on master branch 2018-04-15 14:53:01 -07:00
Chris Feng
5448fb75fa Bump version to 0.18 2018-03-14 01:20:00 +08:00
Chris Feng
3f6c609a2b Fix regressions
(exwm-init): Do not signal an error on startup.

* exwm-floating.el (exwm-floating-toggle-floating):
* exwm-input (exwm-input-send-next-key)
(exwm-input-send-simulation-key):
* exwm-layout (exwm-layout-set-fullscreen)
(exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Fix
incorrect use of `cl-return-from'.
2018-03-10 17:28:43 +08:00
Chris Feng
2f430db735 Minor fixes 2018-03-09 01:06:39 +08:00
Adrián Medraño Calvo
7aae6efdcd Support replacing and being replaced by other window managers
* exwm.el (exwm--on-SelectionClear, exwm--init-icccm-ewmh)
(exwm--exit-icccm-ewmh, exwm--wmsn-acquire, exwm--wmsn-release):
Get the window manager selection; die when it is cleared.
2018-03-06 00:00:00 +00:00
Adrián Medraño Calvo
350950abfc Clean up when failing to start
* exwm.el (exwm-init, exwm-exit): Clean up when failing to start.
(exwm--exit-icccm-ewmh): Stop deleting root window properties on
exit: delete function.
2018-03-06 00:00:00 +00:00