about summary refs log tree commit diff
path: root/exwm-input.el (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-09-20 Fix input & input focus issuesChris Feng1-17/+27
* exwm-manage.el (exwm-manage--manage-window): Only grab left/middle/right buttons. * exwm-input.el (exwm-input--on-ButtonPress): Only perform click-to-focus on unfocused X windows. * exwm-input.el (exwm-input--update-focus): Do not focus an X window on another workspace, but instead keep focusing on the current one and set exwm--urgency parameter on that frame. * exwm-input.el (exwm-input--fake-key): Send KeyRelease event (some applications reply on it).
2015-09-19 Manage non-floating windows without decorationsChris Feng1-3/+9
* exwm-manage.el (exwm-manage--manage-window): Should manage non-floating windows without decorations.
2015-09-19 Check _MOTIF_WM_HINTS when attempting to manage an X windowChris Feng2-5/+35
* exwm-core.el: New buffer-local variable exwm--mwm-hints. * exwm-manage.el: New variable exwm--atom-_MOTIF_WM_HINTS for holding the value of _MOTIF_WM_HINTS atom; new function exwm--update-mwm-hints for updating the _MOTIF_WM_HINTS property of an X window. * exwm-manage.el (exwm-manage--init): Intern the _MOTIF_WM_HINTS atom. * exwm-manage.el (exwm-manage--manage-window): Avoid managing windows without decoration (implied by _MOTIF_WM_HINTS).
2015-09-19 Avoid autoloading variablesChris Feng3-2/+2
* exwm-floating.el: * exwm-layout.el: Avoid autoloading exwm-floating-border-width. * exwm-workspace.el: Avoid autoloading exwm-workspace--switch-history-outdated.
2015-09-18 Prevent Emacs cursor style change when pointer is in an X windowChris Feng1-0/+15
* exwm-input.el (exwm-input--on-KeyPress-char-mode): Compensate FocusOut event by sending a synthetic FocusIn event to prevent the change of cursor style (e.g. box to hollow) when pointer is in an X window.
2015-09-18 Fix a compilation warningChris Feng1-0/+1
* exwm-floating.el: Autoload exwm-floating-border-width.
2015-09-18 Fix wrong/missing ConfigureNotify eventsChris Feng2-11/+57
* exwm-floating.el (exwm-floating--set-floating): Set exwm--floating-edges as absolute edges (the relative edges can be easily determined). * exwm-layout.el (exwm-layout--show): Send correct absolute positions to floating X windows. * exwm-floating.el (exwm-floating--stop-moveresize, exwm-floating-move): Send ConfigureNotify events after moving floating X windows.
2015-09-17 On-demand update exwm-workspace--switch-historyChris Feng4-38/+47
* exwm-workspace.el (exwm-workspace--switch-history-outdated) (exwm-workspace--update-switch-history, exwm-workspace-switch) (exwm-workspace-move-window): * exwm.el (exwm--update-hints, exwm--on-ClientMessage): * exwm-floating.el (exwm-floating--set-floating): * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window): Update exwm-workspace--switch-history only when it's used.
2015-09-16 Allow showing buffers on other workspaces and moving an X window by switchingChris Feng4-33/+58
to its buffer * exwm-workspace.el (exwm-workspace-show-all-buffers, exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): Show buffers on other workspaces if `exwm-workspace-show-all-buffers' is non-nil. * exwm-layout.el (exwm-layout-show-all-buffers, exwm-layout--refresh): Allow moving an X window by switch to its corresponding buffer from another workspace when `exwm-layout-show-all-buffers' is non-nil. * exwm.el (exwm--ido-buffer-window-other-frame): Handle the case when `exwm-layout-show-all-buffers' is non-nil. * exwm-floating.el (exwm-floating--set-floating): Handle the case when *scratch* buffer is killed. * exwm-workspace.el (exwm-workspace-switch-to-buffer): Renamed from `exwm-workspace-switch-to-window' to better reflect its role.
2015-09-11 Fix with-slotsChris Feng1-4/+4
* exwm-randr.el (exwm-randr--refresh): Could not set the name slot in xcb:randr:GetOutputInfo~reply, turn to another variable.
2015-09-11 Minor fix for window moveChris Feng1-1/+1
* exwm-workspace.el (exwm-workspace-move-window): Move to selected instead of the first window of a frame (workspace).
2015-09-11 Implement move/resize with keyboardChris Feng2-8/+123
* exwm-floating.el: Remove an invalid TODO item. * exwm-floating.el (exwm-floating--set-floating) (exwm-floating-hide-mode-line, exwm-floating-show-mode-line): Set window-size-fixed only for fixed-size floating windows. * exwm-floating.el (exwm-floating-move): New function for moving a floating window. * exwm-layout.el (exwm-layout-enlarge-window) (exwm-layout-enlarge-window-horizontally, exwm-layout-shrink-window) (exwm-layout-shrink-window-horizontally): New commands for interactively resizing a floating window.
2015-09-11 Allow switch to normal buffers in exwm-workspace-switch-to-windowChris Feng1-4/+5
* exwm-workspace.el (exwm-workspace-switch-to-window): Allow switch to normal buffers.
2015-09-09 Add a command to interactively move X window to the current workspaceChris Feng1-2/+29
* exwm-workspace.el (exwm-workspace-move-window): Hide buffer on the original Emacs window when moving an X window to the current workspace. * exwm-workspace.el: New function exwm-workspace-switch-to-window for interactively moving an X window on another workspace to the current one.
2015-09-09 Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etcChris Feng4-2/+25
The _NET_CLIENT_LIST_STACKING EWMH property is essential for e.g. the tabbar of chromium to work correctly. * exwm-input.el: Remove invalid TODO item. * exwm.el (exwm--init-icccm-ewmh): Add xcb:Atom:_NET_CLIENT_LIST and xcb:Atom:_NET_CLIENT_LIST_STACKING to _NET_SUPPORTED. * exwm-layout.el (exwm-layout--refresh): Update _NET_CLIENT_LIST_STACKING. * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window): Update _NET_CLIENT_LIST.
2015-09-07 Allow hide/show mode-line on floating framesChris Feng2-18/+62
* exwm-core.el: new buffer-local variable exwm--floating-mode-line-format for saving mode-line-format when mode-line is hidden * exwm-floating.el (exwm-floating--fit-frame-to-window) (exwm-floating-hide-mode-line, exwm-floating-show-mode-line): new functions for resizing frames, hiding/showing mode-line respectively; (exwm-floating--set-floating): use exwm-floating--fit-frame-to-window to resize frames
2015-09-06 Code cleanupsChris Feng2-2/+3
* exwm-workspace.el (exwm-workspace--update-switch-history): use `aref' instead of `elt' to index vectors * .elpaignore: ignore README.md
2015-09-04 Prepare for GNU ELPA releaseChris Feng12-1045/+382
* Transfer copyright to Free Software Foundation * Add packaging components (e.g. headers) * Coding style fixes: + Quote functions with "#'" + Wrap long lines + Fix doc strings / comments * Replace `string-to-int' with `string-to-number' * Fix compiling errors / eliminate compiling warnings + Add exwm-core.el to hold common variables, functions and macros * Remove the redundant COPYING file * Add .gitignore * Rename README to README.md
2015-09-03 Ungrab pointer timely when resizing is abortedChris Feng1-1/+2
* exwm-floating.el (exwm-floating--start-moveresize): when resizing type cannot be decided, ungrab the previously grabbed pointer.
2015-08-28 Minor fixPhilip1-2/+2
2015-08-28 Drop intro to xelb-utilChris Feng1-5/+3
2015-08-27 Avoid deleting the frame created by Emacs client by accidentChris Feng1-5/+4
When Emacs is invoked as `emacsclient -a '' -c`, it creates a frame that can be deleted without any prompt. This commit removes the `client` parameter from that frame to avoid such inconvenience.
2015-08-27 Re-enable complete refresh of keyboard mappingChris Feng1-12/+5
Since the performance of `xcb:keysyms:update-keyboard-mapping` is no longer an problem, we allow every possible refresh of keyboard mapping again.
2015-08-27 Fix window size calculationsChris Feng2-5/+6
* When sending the synthetic ConfigureNotify event, make sure we are dealing with the correct Emacs window * When managing a floating window, ensure it can be easily pick up by the user
2015-08-26 Fix `exwm-workspace-rename-buffer`Chris Feng1-10/+11
Ensure buffer names are unique.
2015-08-26 Correct several EWMH propertiesChris Feng5-52/+58
The following EWMH properties on the root window are corrected in this commit: _NET_VIRTUAL_ROOTS, _NET_WORKAREA and _NET_DESKTOP_VIEWPORT.
2015-08-26 Replay KeyPress events instead of fake them in line-modeChris Feng1-53/+24
X windows in line-mode receive KeyPress events faked with SendEvent requests previously. This causes many problems including: * Some applications (e.g. xterm) ignore synthetic events completely * KeyPress and KeyRelease evnets arrive disorderly This commit makes EXWM exploiting AllowEvents requests (in ReplayKeyboard mode) to forward KeyPress events to X windows instead.
2015-08-24 Avoid using the "no window manager" code in EmacsPhilip4-6/+60
* exwm.el (exwm--on-ClientMessage): Handle fullscreen requests for frames. (exwm-init): Initialize workspaces after unlocking events. * exwm-workspace.el (exwm-workspace--init): Create frames as invisible, then make them visible only once their OverrideRedirect property has been set. * exwm-randr.el (exwm-randr--refresh): New frame parameter `exwm-geometry'. * exwm-layout.el (exwm-layout--set-frame-fullscreen): New function. The Emacs code is buggy, see https://github.com/ch11ng/exwm/issues/39 https://github.com/ch11ng/exwm/pull/42
2015-08-24 Only manage windows mapped as the direct children of root window (close #38)Chris Feng1-3/+8
Sometimes Emacs create child windows of virtual roots. This commit ensures EXWM will not manage them.
2015-08-17 Improve code robustness.Philip3-43/+45
* exwm-layout.el (exwm-layout-unset-fullscreen) (exwm-layout-set-fullscreen): Use `user-error' rather than `cl-assert'. * exwm-input.el (exwm-input--set-focus): Silently accept unknown ids. (exwm-input--grab-keyboard) (exwm-input--release-keyboard): Silently ignore calls for windows that have no buffer. * exwm-manage.el (exwm-manage--kill-client): Don't throw error when trying to kill a vanished window.
2015-08-17 fix buffer renamingPhilip1-2/+4
per https://github.com/ch11ng/exwm/pull/30
2015-08-16 Fix bug when moving a window to the current workspacePhilip1-2/+2
* exwm-workspace.el (exwm-workspace-move-window): Run reparenting code when moving a window to the current workspace.
2015-08-16 Provide hooks run when the floating state of a window changes (close #28)Chris Feng1-2/+9
2015-08-14 Honor `value-mask` field in ConfigureRequest eventChris Feng1-10/+10
Some applications (e.g. JNLP) don't set correct values for fields not mentioned in `value-mask`. This commit corrects this bug together with another Java AWT specific problem.
2015-08-13 Fix input focus stealingChris Feng1-8/+10
This was fixed in b755296 but broken by 04e4269.
2015-08-13 Fix multi-screen bugsChris Feng6-30/+54
* RandR module is now made optional; users can enable it with `exwm-randr-enable`. * Correct the calculation of sizes/coordinates at various places. * Input focus is now tracked with (Emacs) window instead of buffer since the latter can be ambiguous in multi-screen settings.
2015-08-13 Minor fixes for emacsclientChris Feng2-5/+5
2015-08-12 Improve input focus switch mechanismChris Feng5-81/+62
This commit should fix most input focus bugs (especially those related to floating windows). The actual settings of input focus are delayed to exclude redundant event. Dead code since this commit is removed. This commit also fixes a bug for non-floating windows converted form floating state. The workaround for `ido-mode` is also improved to properly handle `exwm-mode` buffers.
2015-08-11 Center floating windows by defaultChris Feng3-2/+26
This commit makes a floating window centered to its leading window if it has a valid WM_TRANSIENT_FOR property set. Other it's placed at the center of the screen.
2015-08-11 Fix buffer switch problemsChris Feng2-1/+31
* Prevent switching to floating windows or windows on other workspaces * Provide a workaround for `ido-mode` (can be enabled with `(exwm-enable-ido-workaround)`)
2015-08-11 Remove redundant code caused by the concurrency of events (contd, 2)Chris Feng4-61/+45
* Remove locks that are no longer required * Also fix #20 (inactive workspace frame steals input focus)
2015-08-10 Ignore repeated `MappingNotify` eventsChris Feng1-7/+18
For some reason, `MappingNotify` events are generated quite frequently and greatly impact the performance. This commit disables the complete refresh of keyboard mapping.
2015-08-10 Remove redundant code caused by the concurrency of events (continued)Chris Feng4-37/+34
Remove `exwm--with-current-id`, which was introduced to as a wrapper to `with-current-buffer` to do extra checks. Note that in functions run as hooks, the validation of window ID is still required as they are not synchronized with events.
2015-08-10 Fix emacsclient bugsChris Feng4-33/+49
`emacsclient` started with `-c` or `-t` argument create a new frame that shall not be used to manage X windows. Also fix some related input focus issues (with some remaining unfixed). Close #17.
2015-08-09 Remove redundant code caused by the concurrency of eventsChris Feng1-10/+1
With the introduction of ch11ng/xelb@6a7bccc, many weird behaviors should disappear. These include by not limit to * race conditions when managing a window (a workaround is provided in @14628a9) * race conditions when unmanaging a window This commit removes some corresponding code.
2015-08-09 Refresh when minibuffer grows (fix #10)Chris Feng1-1/+12
The expansion of echo area is not handled however.
2015-08-08 Show moved window by defaultChris Feng1-8/+13
2015-08-08 Correct layout refresh problemsChris Feng2-16/+21
* Relax the conditions to refresh layout; this may introduce some overheads though * Fix the problem when `*scratch*` buffer is killed; close #12 * Enhance `exwm-reset` by forcing layout refresh in it. This should allow users to overcome some layout bugs
2015-08-08 Fix some input focus issuesChris Feng2-5/+11
* Fix input focus lost after moving window to another workspace * Enhance `exwm-reset` to provide user a way to reset input focus when it's lost unexpectedly
2015-08-08 Fixes for manage/unmanage windowChris Feng2-4/+13
* Make sure `exwm-manage--manage-window-queue` is cleaned * Improve input focus handling after unmanaging a window * Remove a redundant call to `exwm-layout--show`