about summary refs log tree commit diff
path: root/exwm-input.el (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-05 subtree-staging Simplify and improve focus handling (#10)Steven Allen1-29/+23
Combine both focus update timers into one and ignore windows in "no focus" frames. * exwm-input.el (exwm-input--on-buffer-list-update): Avoid focusing windows in frames with the `no-accept-focus` frame property. (exwm-input--update-focus-defer-timer): Remove the duplicate timer. (exwm-input--update-focus-defer): Use a single `exwm-input--update-focus-timer`. (exwm-input--update-focus-commit): Read `exwm-input--update-focus-window` instead of taking a window as a parameter (this is what lets us combine the timers). (exwm-input--update-focus-commit): Use a let-bind instead of unwind-protect. (exwm-input--exit): Remove references to `exwm-input--update-focus-defer-timer`.
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-13 Depend on Emacs 27.1Daniel Mendler1-14/+4
Emacs 27.1 is widely available on all major Linux distributions, including the ones with long time support.
2024-01-12 Remove obsolete functions and variablesDaniel Mendler1-5/+0
These functions and variables have been marked as obsolete over five years ago. * exwm-input.el (exwm-input-set-simulation-keys): Remove obsolete function. * exwm-randr.el (exwm-randr--refresh, exwm-randr-workspace-output-plist): Remove obsolete aliases.
2024-01-12 ; First line of docstring should be a full sentenceDaniel Mendler1-2/+1
2024-01-12 ; Use two spaces after sentenceDaniel Mendler1-1/+1
I follow this convention in Elisp files only.
2024-01-08 ; Shorten docstringsAdrián Medraño Calvo1-2/+3
2024-01-08 Merge branch 'Stebalien.github.com/steb/passthrough-input' into externals/exwmAdrián Medraño Calvo1-1/+18
2024-01-08 Update copyright year to 2024Adrián Medraño Calvo1-1/+1
2023-12-29 Passthrough input when explicitly reading events and keysSteven Allen1-1/+18
When any of these functions are called, Emacs expects to receive all input events until they return. Unfortunately, there doesn't appear to be a reliable way to detect that these functions are currently running other than advising them. * exwm-input.el (exwm-input--init): Advise low-level input reading functions to bind 'exwm-input-line-mode-passthrough' to t when called. (exwm-input--exit): Unadvise. (exwm-input--call-with-passthrough): The advice. (exwm-input--passthrough-functions): The functions we now advise.
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-08-18 Fix bytecompiler warnings, improve docstringsAdrián Medraño Calvo1-13/+13
* 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-0/+2
* 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-06-14 Merge branch 'nbarrientos.github.com/ib_exwm_conn_nil' into externals/exwmAdrián Medraño Calvo1-6/+7
2023-06-09 Observe connection status on deinitializationAdrián Medraño Calvo1-1/+1
* 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-02-01 Check EXWM terminal instead of client or graphical framesAdrián Medraño Calvo1-24/+26
* 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-10-29 Update copyright year to 2021Adrián Medraño Calvo1-1/+1
2020-07-12 Make button events working with winner-modeChris Feng1-11/+17
* exwm-input.el (exwm-input--fake-last-command): Extracted for reuse. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress-line-mode): Use it.
2020-05-06 Run hook upon input mode changeAdrián Medraño Calvo1-2/+8
* exwm-input.el (exwm-input-input-mode-change-hook): Add new hook for code to run upon input mode change. (exwm-input--grab-keyboard, exwm-input--release-keyboard): Run it.
2020-03-29 Merge branch 'Curiosidad-Racional/patch-1' into externals/exwmChris Feng1-13/+13
2020-03-29 Additional fix for winner-modeChris Feng1-3/+4
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Check incomplete key presses (which generate no valid events) before running `pre-command-hook' and `post-command-hook'.
2020-03-21 Fixed fail update when current buffer differs from windowCuriosidad-Racional1-13/+13
Local variable `exwm--input-mode' from different buffer when current buffer don't contains #id window. `with-current-buffer' changes buffer after `cl-case' with local `exwm--input-mode'
2020-03-01 Make exwm-mode buffers work with winner-modeChris Feng1-6/+17
* exwm-input.el (exwm-input--noop): New placeholder command. (exwm-input--on-pre-command, exwm-input--on-post-command): Ignore this command. (exwm-input--on-KeyPress-line-mode): Set `last-command' to make winner-undo start over from the newest config; run `post-command-hook' to make winner-mode save configs; run `pre-command-hook' in case required by some other package.
2020-02-02 Update copyright year to 2020Chris Feng1-1/+1
2019-12-01 Avoid redundant input focus transferChris Feng1-28/+43
* exwm-input.el (exwm-input--set-focus): Check for current focused X window before making an input focus transfer. (exwm-input--on-buffer-list-update): Remove the `this-command' check.
2019-11-03 Add support for accessing keymaps in char-modeChris Feng1-0/+15
* exwm-input.el (exwm-input-invoke-factory): New macro for generating new commands that invoke corresponding prefix keys.
2019-10-27 Loosen the requirements for input focus updateChris Feng1-2/+1
* exwm-input.el (exwm-input--on-buffer-list-update): No more check on current buffer (the check on buffer name was dropped in a1cf0d9b8).
2019-10-13 Fix `exwm-input-set-simulation-key'Chris Feng1-3/+5
* exwm-input.el (exwm-input--read-keys): Return nil on empty input so that `exwm-input-set-simulation-key' can ignore it. (exwm-input-set-simulation-key): Improve prompt.
2019-10-07 Add minibuffer-keyboard-quit to the default pre-post-command-blacklistSteven Allen1-1/+3
* exwm-input.el (exwm-input-pre-post-command-blacklist): Add `minibuffer-keyboard-quit' to the blacklist. This is invoked when the user aborts a the minibuffer with C-g.
2019-10-06 Set the current buffer before handling key eventsSteven Allen1-12/+13
There's no guarantee that the global current buffer matches the selected window's buffer. For example, the following will output "*Messages*" regardless of the actual current buffer: (progn (run-at "1 sec" nil (lambda () (with-current-buffer (get-buffer "*Messages*") (sit-for 5)))) (run-at "2 sec" nil (lambda () (message (buffer-name))))) * exwm-input.el (exwm-input--on-KeyPress): Set the current buffer to selected window's current buffer.
2019-10-02 Avoid calling `x-focus-frame' on non-graphical framesChris Feng1-0/+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-10-02 Allow customizing undetectable commandsChris Feng1-1/+5
* exwm-input.el (exwm-input-pre-post-command-blacklist): List of commands undetectable with `post-command-hook'. (exwm-input--on-pre-command): Use it.
2019-09-22 Make input focus continue to work after EXWM exitsChris Feng1-1/+8
* exwm-input.el (exwm-input--exit): Set input focus 'revert-to' to 'PointerRoot' so that user can set input focus to X windows with pointer after EXWM exits (and there's no other WM).
2019-09-22 Skip global keys unavailable in X serverChris Feng1-18/+21
* exwm-input.el (exwm-input--grab-global-prefix-keys): Some global keys might not be available in X server (perhaps due to misconfiguration).
2019-08-18 Make it possible to answer questions from Emacs when in char-modeChris Feng1-4/+55
* exwm-input.el (exwm-input--echo-area-timer): New variable storing the timer used for detecting echo area messages. (exwm-input--on-minibuffer-setup, exwm-input--on-minibuffer-exit) (exwm-input--on-echo-area-dirty, exwm-input--on-echo-area-clear): New functions for grabbing/releasing keyboard when minibuffer/echo becomes active/inactive. (exwm-input--init, exwm-input--exit): Register/Unregister them. (exwm-input--grab-keyboard, exwm-input--release-keyboard): Validate buffers.
2019-08-11 Avoid checking `*temp*' buffersChris Feng1-5/+1
* exwm-input.el (exwm-input--on-buffer-list-update): The way of detecting a switch from a `*temp*' buffer does not always work. Disable it until we find a better way.
2019-08-05 Fix detection of modifier keys in Emacs eventsChris Feng1-18/+21
* exwm-input.el (exwm-input--grab-global-prefix-keys) (exwm-input--fake-key): * exwm-xim.el (exwm-xim--handle-forward-event-request): X11 allows multiple combinations of KEYSYM-MODIFIERS to generate a same KEYSYM, thus the result of an Emacs event to KEYSYM-MODIFIERS conversion is not necessarily unique. Previously the result of `xcb:keysyms:event->keysym' is misused as the modifiers returned is actually the ones should be consumed.
2019-07-14 Added option to have a key that ends exwm-input-send-next-keySebastian Wålinder1-4/+10
* exwm-input.el (exwm-input-send-next-key): Accept an optional end key.
2019-06-16 Avoid workspace switch loop with `mouse-autoselect-window' enabledChris Feng1-2/+7
* exwm-input.el (exwm-input--last-enter-notify-position): New variable storing last mouse position. (exwm-input--on-EnterNotify): Avoid switching workspace when mouse position is not changed (the event is a result of a workspace switch).
2019-03-24 ; Follows upChris Feng1-6/+6
2019-02-11 Fix compatibility issue with Emacs 25Chris Feng1-1/+3
* exwm-input.el (exwm-input--unread-event): `string-version-lessp' is not available on Emacs 25.
2019-02-06 Merge branch 'retain-echo-area-until-input' of ↵Chris Feng1-2/+7
https://github.com/medranocalvo/exwm into medranocalvo/retain-echo-area-until-input
2019-02-06 Cleanup simulation key config issuesIan Eure1-4/+4
* exwm-input.el (exwm-input-simulation-keys): Original key only has one option, so probably shouldn’t be a `choice` type; Move the "User-defined" key value to the top, since that’s the one someone is most likely to want). * exwm-config.el (exwm-config-default): Only set custom vars if there isn’t a saved value for them.
2019-02-06 Add input method supportChris Feng1-11/+4
; The code is basically refactored from ; https://github.com/ch11ng/exim to get better maintenance. * exwm-xim.el: New module making Emacs's builtin input methods usable for interacting with X windows. * exwm-core.el (exwm--intern-atom): New function for intern X11 atoms. * exwm-input.el (exwm-input--init): * exwm-manage.el (exwm-manage--init): Use it.
2019-02-01 Update copyright year to 2019Chris Feng1-1/+1
2019-01-20 Fix issue with managed tray iconsChris Feng1-3/+10
* exwm-input.el (exwm-input--on-ButtonPress): Replay button events destined for managed tray icons.
2018-12-16 Avoid unnecessary focus changes when creating/killing buffersChris Feng1-0/+4
* exwm-input.el (exwm-input--skip-buffer-list-update): New internal variable for skipping the next 'buffer-list-update'. (exwm-input--on-buffer-list-update): Skip when `exwm-input--skip-buffer-list-update` is set. * exwm-manage.el (exwm-manage--manage-window): Set `exwm-input--skip-buffer-list-update` when creating/killing buffers.