Commit graph

11955 commits

Author SHA1 Message Date
Chris Feng
4ad76b879d Fix a calculation error of the position of a floating frame
* exwm-floating.el (exwm-floating--set-floating): The position of a
  floating frame should be relative to its workspace.
2015-09-24 20:03:57 +08:00
Chris Feng
22ee3e6c5f Adjust default prefix keys; advice x-create-frame
* exwm-input.el (exwm-input--on-KeyPress-line-mode, exwm-input-prefix-keys):
  Allow users to disable 'C-c' prefixed keys; Add 'C-c' to / remove 'M-!'
  from the default prefix keys.

* exwm-workspace.el (exwm-workspace--x-create-frame, exwm-workspace--init):
  Advice `x-create-frame' to prevent it from hanging EXWM, making e.g.
  speedbar working.
* exwm-floating.el (exwm-floating--set-floating): Remove the now unnecessary
  request that sets override-redirect on floating frames.
2015-09-23 12:53:08 +08:00
Chris Feng
623db8b378 Minor fixes for packaging
* .gitignore: Add ELPA files.
* exwm-workspace.el: Autoload exwm-workspace-switch.
* README.org: Renamed from README.md; add an installation note.
2015-09-21 13:31:57 +08:00
Chris Feng
9f30672b15 Fix input & input focus issues
* 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-20 10:51:58 +08:00
Chris Feng
81478de9e6 Manage non-floating windows without decorations
* exwm-manage.el (exwm-manage--manage-window): Should manage non-floating
  windows without decorations.
2015-09-19 17:52:04 +08:00
Chris Feng
b35430429e Check _MOTIF_WM_HINTS when attempting to manage an X window
* 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 16:53:45 +08:00
Chris Feng
921e6e5be9 Avoid autoloading variables
* exwm-floating.el:
* exwm-layout.el:
  Avoid autoloading exwm-floating-border-width.
* exwm-workspace.el:
  Avoid autoloading exwm-workspace--switch-history-outdated.
2015-09-19 12:34:30 +08:00
Chris Feng
c75a8b82ec Prevent Emacs cursor style change when pointer is in an X window
* 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 22:15:45 +08:00
Chris Feng
26ebc32e60 Fix a compilation warning
* exwm-floating.el: Autoload exwm-floating-border-width.
2015-09-18 14:38:05 +08:00
Chris Feng
412d2a52bd Fix wrong/missing ConfigureNotify events
* 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-18 14:17:52 +08:00
Eelco Dolstra
4ba6bc184c Shut up clang warnings 2015-09-18 01:22:35 +02:00
Chris Feng
4255f078a6 On-demand update exwm-workspace--switch-history
* 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-17 19:48:50 +08:00
Eelco Dolstra
3d91bfc8f8 Merge pull request #646 from vcunat/master
nix-env --upgrade improvements
2015-09-17 12:45:35 +02:00
Vladimír Čunát
42808fa281 nix-env --upgrade: show "downgrading" when doing so
It was strange to show "upgrading" when the version was getting lower.
This is left on "upgrading" when the versions are the same,
as I can't see any better wording.
2015-09-17 12:09:54 +02:00
Vladimír Čunát
12a4aea93d doc: fix the 'prebuild' typos 2015-09-17 12:08:05 +02:00
Vladimír Čunát
64f9b511be nix-env --upgrade: avoid unexpected downgrades
Until now, if one explicitly installed a low-priority version,
nix-env --upgrade would downgrade it by default and even with --leq.
Let's never accept an upgrade with version not matching the upgradeType.
Additionally, let's never decrease the priority of an installed package;
you can use --install to force that.

Also refactor to use variable bestVersion instead of bestName,
as only version was used from it.
2015-09-17 12:06:26 +02:00
Chris Feng
b458d5ac30 Allow showing buffers on other workspaces and moving an X window by switching
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-16 21:36:36 +08:00
Anthony Cowley
e5c3e054ec Update prerequisites-source.xml
The Perl WWW::Curl bindings are required to build Nix.
2015-09-15 12:42:44 -04:00
Chris Feng
576a676f1f Fix with-slots
* exwm-randr.el (exwm-randr--refresh): Could not set the name slot in
  xcb:randr:GetOutputInfo~reply, turn to another variable.
2015-09-11 21:00:27 +08:00
Chris Feng
cfbd9a5a45 Minor fix for window move
* exwm-workspace.el (exwm-workspace-move-window): Move to selected instead of
  the first window of a frame (workspace).
2015-09-11 17:34:06 +08:00
Chris Feng
dbcabe7946 Implement move/resize with keyboard
* 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 17:16:17 +08:00
Chris Feng
1d435157d3 Allow switch to normal buffers in exwm-workspace-switch-to-window
* exwm-workspace.el (exwm-workspace-switch-to-window): Allow switch to normal
  buffers.
2015-09-11 08:07:53 +08:00
Chris Feng
3f2f844569 Add a command to interactively move X window to the current workspace
* 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 19:08:51 +08:00
Chris Feng
5373c1df1a Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etc
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-09 11:26:17 +08:00
Eelco Dolstra
8a2f5f0607 Fix building against Nix 1.10
Fixes #12.
2015-09-07 13:05:58 +02:00
Chris Feng
eafd031c55 Allow hide/show mode-line on floating frames
* 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-07 17:33:22 +08:00
Chris Feng
637ac15719 Code cleanups
* exwm-workspace.el (exwm-workspace--update-switch-history): use `aref' instead
  of `elt' to index vectors
* .elpaignore: ignore README.md
2015-09-06 17:18:48 +08:00
Eelco Dolstra
55b1146150 Bump version 2015-09-04 10:02:50 +02:00
Chris Feng
6d63c71280 Prepare for GNU ELPA release
* 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-04 09:15:20 +08:00
Eelco Dolstra
71a5161365 Implement buildDerivation() via the daemon 2015-09-03 12:56:59 +02:00
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
Eelco Dolstra
6e06a18d1b Release notes 2015-09-03 11:57:47 +02:00
Eelco Dolstra
73332fd342 Filter build-chroot-dirs entries that conflict with derivation outputs
Fixes https://github.com/NixOS/nixpkgs/issues/9504.

Note that this means we may have a non-functional /bin/sh in the
chroot while rebuilding Bash or one of its dependencies. Ideally those
packages don't rely on /bin/sh though.
2015-09-02 14:54:12 +02:00
Eelco Dolstra
d711fe8f5e Remove unused variable 2015-09-02 14:46:04 +02:00
Eelco Dolstra
ce97523a7c Fix readDir example
Fixes https://github.com/NixOS/nixos-homepage/issues/46.
2015-09-01 16:53:51 +02: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
Preston
5e4b2109b5 Update nix.spec.in
Nix requires libcurl-devel to build.
2015-08-24 22:25:24 -07: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
Eelco Dolstra
e12cf82782 Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()
Fixes #616.
2015-08-24 11:13:31 +02:00
Eelco Dolstra
eadb86f447 nix-collect-garbage: Revive --max-freed
Fixes #609.
2015-08-21 13:57:53 +02:00