Commit graph

167 commits

Author SHA1 Message Date
Chris Feng
981293f06a Replay KeyPress events instead of fake them in line-mode
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-26 15:35:54 +08:00
Philip
d1806e9188 Improve code robustness.
* 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 07:45:10 +00:00
Chris Feng
dba43b018d Fix input focus stealing
This was fixed in b755296 but broken by 04e4269.
2015-08-13 15:33:02 +08:00
Chris Feng
07e59e0429 Fix multi-screen bugs
* 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 12:02:44 +08:00
Chris Feng
35560a49d6 Minor fixes for emacsclient 2015-08-13 07:54:19 +08:00
Chris Feng
04e4269617 Improve input focus switch mechanism
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-12 18:09:35 +08:00
Chris Feng
1ce18afd05 Center floating windows by default
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 15:06:11 +08:00
Chris Feng
b755296f54 Remove redundant code caused by the concurrency of events (contd, 2)
* Remove locks that are no longer required
* Also fix #20 (inactive workspace frame steals input focus)
2015-08-11 09:18:21 +08:00
Chris Feng
24b964bb4a Ignore repeated MappingNotify events
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 21:01:55 +08:00
Chris Feng
048994c794 Remove redundant code caused by the concurrency of events (continued)
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 14:23:37 +08:00
Chris Feng
2d4104a0ec Fix emacsclient bugs
`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-10 10:55:28 +08:00
Chris Feng
84f0f0328b Fix input focus lost after closing window
Also insert some debug messages.
2015-08-07 20:22:12 +08:00
Chris Feng
2ad1a89db0 Various input fixes
* Fix `exwm-reset`
* Make input mode buffer local
* Allow window to stay in `char-mode` while setting input focus to other window
  or switching to other workspace
2015-08-07 12:41:15 +08:00
Chris Feng
3fc0cb2bf7 Various fixes
* Prevent marking the end of a key sequence with a single `C-u'.
* Enable `C-u' prefix for key simulation since it's not possible for users to
  define simulation keys starting with `C-u'.
* Make Emacs idle only after the visual parts are updated to prevent from
  disturbing users.
* Should use '?\s' instead of '? '.
2015-08-05 14:10:44 +08:00
Chris Feng
36e8361b9b Various fixes
Remove wrong shift modifiers.
Hide a Window when it's moved to another workspace.
2015-07-19 09:15:53 +08:00
Chris Feng
968d0b4882 Various fixes for workspace
Fixes for full screen, move window, etc.
2015-07-18 21:16:14 +08:00
Chris Feng
10a7fe8d65 First commit 2015-07-17 19:16:08 +08:00