Commit graph

353 commits

Author SHA1 Message Date
Chris Feng
f1d37b9a8c Ungrab pointer timely when resizing is aborted
* exwm-floating.el (exwm-floating--start-moveresize): when resizing type cannot
  be decided, ungrab the previously grabbed pointer.
2015-09-03 18:56:36 +08:00
Chris Feng
9eee94e530 Merge pull request #52 from pipcet/minor-fix
Minor fix (quote class for make-instance)
2015-08-29 19:03:51 +08:00
Philip
f7bec7a977 Minor fix 2015-08-28 18:14:04 +00:00
Chris Feng
76f48490b1 Drop intro to xelb-util 2015-08-28 18:33:02 +08:00
Chris Feng
5222dc17d6 Avoid deleting the frame created by Emacs client by accident
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 13:07:25 +08:00
Chris Feng
7032ee7003 Re-enable complete refresh of keyboard mapping
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 11:13:22 +08:00
Chris Feng
5f9f673791 Fix window size calculations
* 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-27 11:03:27 +08:00
Chris Feng
bb4ebde55b Fix exwm-workspace-rename-buffer
Ensure buffer names are unique.
2015-08-26 19:35:19 +08:00
Chris Feng
b50a6e6dd9 Correct several EWMH properties
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 17:40:39 +08:00
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
Chris Feng
874c383672 Merge pull request #42 from pipcet/ewmh-fullscreen
Avoid using the "no window manager" code in Emacs
2015-08-25 19:22:09 +08:00
Philip
94bdbfc0da Avoid using the "no window manager" code in Emacs
* 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 19:12:45 +00:00
Chris Feng
5210e13e7c Only manage windows mapped as the direct children of root window (close #38)
Sometimes Emacs create child windows of virtual roots. This commit ensures EXWM
will not manage them.
2015-08-24 19:01:27 +08:00
Chris Feng
5882015eb5 Merge branch 'pipcet-move-window-fix' 2015-08-17 17:56:15 +08:00
Chris Feng
2d07429d0f Merge branch 'move-window-fix' of https://github.com/pipcet/exwm into pipcet-move-window-fix 2015-08-17 17:50:50 +08:00
Chris Feng
7120291197 Merge branch 'pipcet-robustness' 2015-08-17 17:47:10 +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
Philip
43b00d2f0f fix buffer renaming
per https://github.com/ch11ng/exwm/pull/30
2015-08-17 06:40:43 +00:00
Philip
15ad591d97 Fix bug when moving a window to the current workspace
* exwm-workspace.el (exwm-workspace-move-window): Run
          reparenting code when moving a window to the current workspace.
2015-08-16 18:09:42 +00:00
Chris Feng
d998b42b89 Provide hooks run when the floating state of a window changes (close #28) 2015-08-16 19:02:48 +08:00
Chris Feng
7bfd429d52 Honor value-mask field in ConfigureRequest event
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-14 17:46:43 +08: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
801185c7cc Fix buffer switch problems
* 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 11:54:38 +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
edc70eb661 Remove redundant code caused by the concurrency of events
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 18:05:13 +08:00
Chris Feng
36bb5793c2 Refresh when minibuffer grows (fix #10)
The expansion of echo area is not handled however.
2015-08-09 11:27:48 +08:00
Chris Feng
42f4ec6db5 Show moved window by default 2015-08-08 20:39:05 +08:00
Chris Feng
63402b0efc Correct layout refresh problems
* 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 20:12:07 +08:00
Chris Feng
52984898ec Fix some input focus issues
* 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 11:16:17 +08:00
Chris Feng
3b9d0dd921 Fixes for manage/unmanage window
* 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`
2015-08-08 08:29:57 +08:00
Chris Feng
14628a940c Fix race conditions when managing a window
Since it takes some time for EXWM to create a buffer for a window (to do some
checking for example), the window may send several MapRequest events before
it's mapped. This commit should fix such issue.
2015-08-07 21:52:34 +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
1e36a22b3f Check buffer mode in exwm-reset
This should prevent users from misoperation.
2015-08-06 14:41:28 +08:00
Chris Feng
3fb90b9eaa Fix fullscreen issues
* Correct ConfigureNotify events sent to fullscreen windows.
* Exit fullscreen mode before switching workspace.
* Temporarily treat `xcb:Atom:_NET_WM_STATE_ABOVE` as
  `xcb:Atom:_NET_WM_STATE_FULLSCREEN` since
  a) "plugin-container" (Flash Player) seems only set this, and
  b) it's not normally used by applications.
  This makes fullscreen videos working in e.g. iceweasel.
2015-08-06 12:32:14 +08:00
Chris Feng
caf2feec63 Drop intro to EXIM 2015-08-05 20:53:17 +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
ee3ce55c48 Merge pull request #2 from KAMiKAZOW/patch-1
Fix typos
2015-08-05 09:02:02 +08:00
Markus S.
ea7c6c7035 Fix typos 2015-08-05 02:57:50 +02:00
Chris Feng
86764d27a3 Add basic RandR support
This implementation is analogous to that in i3-wm, which requires external
tools to properly configure RandR first.
2015-08-03 20:26:53 +08:00
Chris Feng
f4416a10e3 Fix potential naming conflicts
Buffers may share a same name (without the possible leading space) when created
in different workspaces.
2015-07-26 16:04:21 +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