Age | Commit message (Collapse) | Author | Files | Lines |
|
* exwm-input.el (exwm-input--set-focus): Applications like XTerm
crashes on receiving WM_TAKE_FOCUS so only send it to X windows
accepting it.
|
|
|
|
* exwm-input.el (exwm-input--set-focus): Send an extra WM_TAKE_FOCUS
event to workaround the key replay issue with Xorg 1.20 when keyboard
is grabbed.
|
|
This reverts commit 0680be104f9394e39dd55b5c4e33b9b7e4e77926.
|
|
; A change has been made in Xorg server 1.20 that replaying a key
; event with keyboard grabbed would generate extra focus change and
; enter/leave events. This basically breaks line-mode for apps like
; Firefox. This commit reimplements the grab & replay functionality
; with XI2 and XTEST.
* exwm-input.el (exwm-input--devices): New variable for caching slave
keyboards.
(exwm-input--update-devices): Update it and re-grab keys if necessary.
(exwm-input--on-Hierarchy): Event listener for the Hierarchy event
that would in turn call `exwm-input--update-devices' to update the
cache.
* exwm-input.el (exwm-input--on-KeyPress): Use XI2 KeyPress events.
(exwm-input--on-KeyRelease): Event listener for the KeyRelease events.
(exwm-input--grab-global-prefix-keys): Use XI2 and also select
KeyRelease events.
(exwm-input--on-KeyPress-line-mode): Use XI2 KeyPress events and
replay key events with XTEST.
(exwm-input--on-KeyPress-char-mode, exwm-input--grab-keyboard)
(exwm-input--release-keyboard): Use XI2 KeyPress events.
* exwm-input.el (exwm-input--init): Initialize the XI2 and XTEST
extensions; add listeners for XI2 KeyPress, KeyRelease and Hierarchy
events.
|
|
* exwm-input.el (exwm-input--mimic-read-event): New function for
handling `extra-keyboard-modifiers' and `keyboard-translate-table'.
(exwm-input--cache-event): Do not unread events here.
(exwm-input--on-KeyPress-line-mode)
(exwm-input--on-KeyPress-char-mode): Compare with preprocessed events
and unread raw ones.
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Add support for
`overriding-terminal-local-map'.
|
|
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Do not test
`exwm-mode-map' to see if a key should be forwarded to Emacs as it's
overridden when local simulation keys are present.
|
|
* exwm-input.el (exwm-input--on-pre-command): Keys should be forwarded
to the X window (if its Emacs window is currently selected) after
exiting the minibuffer.
|
|
(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'.
|
|
|
|
* 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".
|
|
* exwm-input.el (exwm-input--exit): Remove missing hook reset window
variable.
|
|
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Use
`lookup-key' to check whether a the event is defined in the
`exwm-mode-map' keymap.
|
|
* exwm-input.el (exwm-input--set-simulation-keys): Try the local
binding first do not clear the hash table (rely on GC).
|
|
* exwm-input.el (exwm-input-prefix-keys): Remove ?\C-c.
(exwm-input--on-KeyPress-line-mode):
* exwm-core.el (): Detect keys in `exwm-mode-map' in line-mode.
|
|
* exwm-input.el (exwm-input--set-simulation-keys): New function for
actullay setting simulation keys.
(exwm-input-simulation-keys, exwm-input-set-local-simulation-keys)
(exwm-input--init): Use this instead of
`exwm-input-set-simulation-keys'.
(exwm-input-set-simulation-keys): Make obsolete.
(exwm-input--read-keys): New function for reading an arbitrary key
sequence.
(exwm-input-set-simulation-key): New command for setting a new
simulation key (which can be saved in the Customize interface).
|
|
* exwm-input.el (exwm-input--set-key): New function for actually
setting the binding.
(exwm-input-global-keys): New user option for customizing global keys.
(exwm-input-set-key): Update `exwm-input-global-keys' and call
`exwm-input--set-key'
(exwm-input--init): Initialize global keys.
|
|
* exwm-input.el (exwm-input--on-CreateNotify): New function for
grabbing global keys on newly created X windows.
(exwm-input--update-global-prefix-keys): Grab global keys on top-level
X windows instead of the root window.
(exwm-input--grab-global-prefix-keys): New function for grabbing
global keys on X windows.
(exwm-input--release-keyboard): Grab global keys in char-mode.
(exwm-input--init): Select CreateNotify events.
* exwm-core.el (exwm--unlock):
* exwm-input.el (exwm-input--on-FocusIn, exwm-input--init): Do not
handle FocusIn events on the root window.
|
|
* exwm-core.el (exwm--unlock): Select FocusChange events on the root
window.
* exwm-input.el (exwm-input--on-FocusIn): Input focus should stay on
the current workspace when the root window receives a FocusIn event.
|
|
* exwm-input.el (exwm-input-simulation-keys): New user option for
setting simulation keys.
(exwm-input--init): Initialize simulation keys from this variable.
* exwm-input.el (exwm-input--simulation-prefix-keys)
(exwm-input--on-KeyPress-line-mode)
(exwm-input--update-simulation-prefix-keys)
(exwm-input-set-simulation-keys, exwm-input-set-local-simulation-keys)
(exwm-input-send-simulation-key): `exwm-input--simulation-keys' is now
a hash table storing both simulation keys and prefix keys.
(exwm-input--unset-simulation-keys): Clear the hash table.
(exwm-input--exit): Use `exwm-input--unset-simulation-keys'.
* exwm-core.el (exwm--kmacro-map, exwm-mode-menu): Adapt to the
change of `exwm-input--simulation-keys'.
* exwm-config.el (exwm-config-default): Update the example.
|
|
; Also fix documentations.
|
|
; 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.
|
|
* exwm-input.el (exwm-input--translate): New function for translating
keys according to `input-decode-map', `local-function-key-map' and
`key-translation-map'.
(exwm-input--cache-event): Use it.
|
|
|
|
; This feature requires both `mouse-autoselect-window` and
; `focus-follows-mouse' being set. Delaying autoselection is not
; supported yet.
* exwm-core.el (exwm--client-event-mask): Select the EnterNotify event
on each X window when `mouse-autoselect-window' is set.
* exwm-input.el (exwm-input--on-EnterNotify): New function for making
`mouse-autoselect-window' work on X windows.
(exwm-input--init): Listen to EnterNotify event when
`mouse-autoselect-window' is set.
|
|
|
|
|
|
* exwm-input.el (exwm-input--on-keysyms-update): New function for
re-grabbing global keys.
(exwm-input--init): Register it to XELB.
|
|
* exwm-core.el (exwm--defer):
* exwm-input.el (exwm-input--update-focus-defer): Avoid unnecessarily
long delay.
* exwm-input.el (exwm-input--on-FocusIn): Filter out FocusIn events
generated as a result of grab/ungrab or when the keyboard is grabbed.
|
|
* 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.
|
|
* exwm-input.el (exwm-input--unread-event): Update the note.
(exwm-input-send-next-key): Remove the workaround.
|
|
* exwm-input.el (exwm-input--on-buffer-list-update): Filter out events
relating to temp buffers by detecting if temp-buffer is present.
|
|
* exwm-input.el (exwm-input--move-keysym, exwm-input--move-mask)
(exwm-input--resize-keysym, exwm-input--resize-mask): Removed.
(exwm-input--on-ButtonPress): Compare using Emacs events rather than
raw X11 events or it would fail with num-lock no.
(exwm-input--init): No longer cache raw keysym/state for button events.
|
|
|
|
|
|
|
|
That way, exwm won't clobber user modifications to this variable.
|
|
|
|
|
|
* exwm-input.el (exwm-input--init):
* exwm-randr.el (exwm-randr--init):
* exwm-workspace.el (exwm-workspace--init):
Add certain frame parameters into `frameset-filter-alist' to prevent
them from being saved/restored which makes little sense and is
problematic.
|
|
* exwm-input.el (exwm-input--update-global-prefix-keys): Grab global
prefix keys with num-lock mask set, or those keys won't be activated
when num-lock is enabled.
|
|
* exwm-input.el (exwm-input--update-focus): Unlock before switching
workspace. Also make sure the correct Emacs window is chosen for the
target workspace.
|
|
* exwm-floating.el (exwm-floating--unset-floating): Never use the
minibuffer window to display an `exwm-mode' buffer.
* exwm-input.el (exwm-input--on-buffer-list-update)
(exwm-input--update-focus): Allow updating input focus when the
minibuffer is active.
(exwm-input--update-focus): Handle the case when an auto-hiding
minibuffer is active.
(exwm-input--during-key-sequence): Renamed to
`exwm-input--line-mode-passthrough'.
(exwm-input--line-mode-passthrough): New variable for forcing all events
to be passed to Emacs in line-mode.
(exwm-input--on-KeyPress-line-mode, exwm-input-send-next-key): Use it.
(exwm-input--finish-key-sequence, exwm-input--init, exwm-input--exit):
Drop `exwm-input--finish-key-sequence'.
(exwm-input--line-mode-cache): New variable for caching incomplete key
sequences.
(exwm-input--cache-event): New function for handling new key events.
(exwm-input--on-KeyPress-line-mode, exwm-input--on-KeyPress-char-mode):
Use it.
|
|
* exwm-input.el (exwm-input--on-buffer-list-update): Filter out
switch-frame events.
(exwm-input--update-focus): Switch workspace to set input focus on an X
window from another workspace.
|
|
* exwm-core.el (exwm--kmacro-map): New keymap used when executing
keyboard macros.
(exwm-mode): Use `exwm--kmacro-map' to override the default keymap.
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Send extra key
events when defining keyboard macros.
|
|
|
|
* exwm-input.el (exwm-input-toggle-keyboard): New command for toggling
keyboard mode.
* exwm-layout.el (exwm-layout-toggle-fullscreen): New command for
toggling fullscreen mode.
* exwm-core.el (exwm-mode-menu, exwm-mode-map): Use them.
|
|
* exwm-input.el (exwm-input--set-focus): Partly revert 810b471.
|
|
* exwm-input.el (exwm-input--timestamp-window)
(exwm-input--timestamp-atom, exwm-input--timestamp-callback): New
variables for updating timestamp.
(exwm-input--set-focus): Send WM_TAKE_FOCUS ClientMessage with updated
timestamp.
(exwm-input--update-timestamp): New utility function for fetching
timestamp.
(exwm-input--on-PropertyNotify): New function for handling
PropertyNotify event to extract the timestamp.
(exwm-input--init): Create resources for updating timestamp; attach the
event listener.
(exwm-input--on-ButtonPress, exwm-input--on-KeyPress):
* exwm.el (exwm--on-PropertyNotify): No longer update timestamp.
* exwm-input.el (exwm-input--set-focus): Avoid setting input focus on
already focused X windows, or when the input focus in not on a Emacs
frame if globally active model is in use.
* exwm-floating.el (exwm-floating--set-floating):
* exwm-workspace.el (exwm-workspace-move-window)
(exwm-workspace--add-frame-as-workspace, exwm-workspace--init):
Set 'exwm-id' frame parameter as the numerical (inner) frame X ID.
|
|
* exwm-input.el (exwm-input--on-FocusIn): Set input focus to the
workspace frame when input focus is received by a workspace container.
(exwm-input--on-workspace-list-change): Select FocusChange event mask on
workspace containers.
(exwm-input--init): Attach the event listener; adapt function calls.
|