Commit graph

80 commits

Author SHA1 Message Date
Chris Feng
f167bc979c Replace `frame-geometry'
* exwm-workspace.el (exwm-workspace--frame-y-offset)
exwm-workspace--window-y-offset, exwm-workspace--update-offsets): New
variables & function for the calculation of Emacs frame offsets, as
`frame-geometry' is not available in Emacs 24.
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--do-moveresize):
* exwm-layout.el (exwm-layout--show):
* exwm-systemtray.el (exwm-systemtray--on-workspace-switch)
(exwm-systemtray--on-randr-refresh, exwm-systemtray--init): Use them.

* exwm-systemtray.el (exwm-systemtray--refresh-all): Renamed from
`exwm-systemtray--on-randr-refresh'.
(exwm-systemtray--init, exwm-systemtray--exit): Use it.

* exwm-floating.el (exwm-floating--stop-moveresize): Send a
ConfigureNotify event to floating frame to update its position (seems
required by Emacs 24).
2019-09-14 00:00:00 +00:00
Chris Feng
48b15e25ad Improve user options
* exwm-floating.el (exwm-floating-border-color)
(exwm-floating-border-width): Make changes take effect w/o restart.
(exwm-floating--init-border): Refactored out from
`exwm-floating--init'.

* exwm-workspace.el (exwm-workspace-minibuffer-position): Clarify
a restart is required.
2019-09-13 00:00:00 +00:00
Chris Feng
ccc4cce0e0 Fix floating X window size with menu-bar/tool-bar enabled
* exwm-floating.el (exwm-floating--set-floating)
exwm-floating--do-moveresize)
exwm-layout.el (exwm-layout--show): Take menu-bar/tool-bar into
consideration.
2019-09-08 00:00:00 +00:00
Chris Feng
73b4d6f966 ; Follows up 2019-03-24 00:00:00 +00:00
Chris Feng
397ca5497e Remove loading order dependency on `mouse-autoselect-window'
* exwm-core.el (exwm--get-client-event-mask): Renamed from
`exwm--client-event-mask' and used as a function.
* exwm-floating.el (exwm-floating--unset-floating):
* exwm-layout.el (exwm-layout--hide):
* exwm-manage.el (exwm-manage--manage-window): Use it.
2019-03-17 00:00:00 +00:00
Chris Feng
993ca8a13a Update copyright year to 2019 2019-02-01 00:00:00 +00:00
Chris Feng
58f7916619 ; Improve debug logs. 2018-12-02 00:00:00 +00:00
Chris Feng
bc5f0b3ffa ; Use `derived-mode-p'. 2018-07-15 00:00:00 +08:00
Chris Feng
3f6c609a2b Fix regressions
(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'.
2018-03-10 17:28:43 +08:00
Chris Feng
2f430db735 Minor fixes 2018-03-09 01:06:39 +08:00
Adrián Medraño Calvo
cf98e3d921 Name all helper windows created by EXWM
* 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".
2018-03-06 00:00:00 +00:00
Chris Feng
7013b0122a Add header-line format support in per-application configurations
* exwm-manage.el (exwm-manage-configurations):
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Allow customizing header-line format
for floating/tiling X windows.
2018-03-04 01:39:12 +08:00
Chris Feng
e141ee6847 Add various per-application configurations
* exwm-manage.el (exwm-manage-configurations): Add options for
fullscreen mode and floating & tiling mode-line formats.
(exwm-manage--manage-window): Add support for configuring
line-mode/char-mode, prefix keys, simulation keys and fullscreen mode.
* exwm-floating.el (exwm-floating--set-floating): Add support for
configuring the geometry, mode-line format and border width of a
floating X window.
(exwm-floating--unset-floating): Add support for configuring the
mode-line format of a tiling X window.
2018-03-03 01:00:28 +08:00
Chris Feng
5c5729c0d4 Fix various issues with multi-monitor support
* exwm-workspace.el (exwm-workspace-switch): Do not hide X windows
when switching to a workspace on another output; update the
timestamp (last switched to) of a workspace frame.
(exwm-workspace-move-window): Do not hide an X window when moving it
to an active workspace on another output.

* exwm-floating.el (exwm-floating--set-floating):
* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--manage-window)
(exwm-manage--on-ConfigureRequest):
* exwm-systemtray.el (exwm-systemtray--refresh)
(exwm-systemtray--init):
Correct coordinate calculations.

* exwm-workspace.el (exwm-workspace--current-width): Removed since no
longer used.
2018-02-19 22:40:27 +08:00
Chris Feng
d22e6740d7 Add customization settings
; Also fix documentations.
2018-02-19 00:04:27 +08:00
Chris Feng
7823eb988c Make X windows container-less
; 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.
2018-02-18 01:04:04 +08:00
Chris Feng
83c0a2db34 Avoid crashing Emacs by resizing its frame into 0x0
* exwm-floating.el (exwm-floating--do-moveresize):
* exwm-layout.el (exwm-layout-enlarge-window): Resizing a frame into
0x0 crashes Emacs so additional checks are required.
2018-02-04 22:38:02 +08:00
Chris Feng
76d6f608bc Update copyright year to 2018 2017-12-31 20:49:37 +08:00
Chris Feng
46dfaeb031 Avoid reusing dedicated window
* exwm-floating.el (exwm-floating--unset-floating):
* exwm-manage.el (exwm-manage--on-MapRequest):
Do not select a dedicated window for displaying a buffer.
2017-08-31 00:58:39 +08:00
Chris Feng
267ebd7f55 Force repositioning floating Emacs frames
* exwm-floating.el (exwm-floating--set-floating): Ditto.
2017-05-07 18:40:08 +08:00
Chris Feng
9926d87b65 Update copyright year to 2017 2017-02-05 17:49:42 +08:00
Chris Feng
089afdc8cc Fix problems with active minibuffer
* 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.
2016-10-06 12:47:56 +08:00
Chris Feng
6be75083c2 Use X window borders
; This commit replaces the internal borders of Emacs frames with X
; window borders.  This should make the flickering issue of floating X
; windows less serious.

* exwm-floating.el (exwm-floating--border-pixel)
(exwm-floating--border-colormap): New variables for storing border pixel
and its colormap.
(exwm-floating--set-floating): Do not set the internal border (and
background color) of floating frames; do not take
`exwm-floating-border-width' into account when calculating geometries;
set the border of floating X window containers.
(exwm-floating--unset-floating): No need to restore the position of X
windows any more; hide the border of floating X window containers.
(exwm-floating--init): Initialize the border pixel.
* exwm-layout.el (exwm-layout-set-fullscreen)
(exwm-layout-unset-fullscreen): Show/Hide container border respectively.
* exwm-manage.el (exwm-manage--manage-window): Set the border pixel and
colormap of X window containers.
* exwm-workspace.el (exwm-workspace-move-window): Do not set the
internal border and background color of floating frames.
* exwm.el (exwm--on-ClientMessage): Simplify the code for calculating
_NET_REQUEST_FRAME_EXTENTS.
2016-09-23 18:41:43 +08:00
Chris Feng
2597f74c7f Remember the geometries of floating X windows
* exwm-floating.el (exwm-floating--stop-moveresize):
* exwm-layout.el (exwm-layout-enlarge-window):
Update the geometry after resizing.
2016-09-23 18:36:09 +08:00
Chris Feng
b4517fbfa0 Force using visible buffers in `other-buffer'
* exwm-floating.el (exwm-floating--set-floating):
* exwm-workspace.el (exwm-workspace-move-window):
Buffers visible on other frames should be treated as invisible.  One
side effect is visible buffers on the current frame is also taken into
account.
2016-08-31 19:18:42 +08:00
Chris Feng
db5128c1b9 Fix CreateWindow attributes
; Also fix various compile warnings.

* exwm-floating.el (exwm-floating--set-floating):
* exwm-manage.el (exwm-manage--manage-window):
* exwm-systemtray.el (exwm-systemtray--init):
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace)
(exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Explicitly specify the class (InputOutput or InputOnly) and for an
InputOutput X window the background pixmap when creating an X window.
2016-08-12 19:18:32 +08:00
Chris Feng
810b4716a1 Update timestamp for WM_TAKE_FOCUS ClientMessage
* 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.
2016-08-09 13:34:29 +08:00
Chris Feng
767abdf9e6 Fix coordinates calculations concerning workspaces
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--do-moveresize):
* exwm-manage.el (exwm-manage--manage-window):
Use the computed workareas rather than RandR output geometries.
2016-08-09 13:26:15 +08:00
Chris Feng
6e0b944c2d Ensure floating hooks are run in the right context
* exwm-floating.el (exwm-floating-setup-hook, exwm-floating-exit-hook):
Fix doc string.
(exwm-floating--set-floating, exwm-floating--unset-floating): Set the
context.
2016-08-09 13:20:36 +08:00
Chris Feng
f52848595d ; * exwm-floating.el (exwm-floating--unset-floating): Reposition an X
; window when it changes from floating to tiling layout.
2016-07-29 17:11:28 +08:00
Chris Feng
6571bb5761 Minor cleanups
; Eliminate compile warnings.
; Rename frame parameter 'exwm--urgency' to 'exwm-urgency'.
; Simplify expressions.
2016-07-21 12:41:51 +08:00
Chris Feng
b409d873b6 Merge branch 'medranocalvo/dynamic-workspaces' into externals/exwm 2016-07-19 11:01:19 +08:00
Chris Feng
c22f35620f Fix 2 dock-related issues
* exwm-floating.el (exwm-floating--set-floating): Add a workaround to
prevent accidental move of Emacs frame when struts are set.

* exwm-workspace.el (exwm-workspace--update-workareas): Make legacy
docks working.
2016-07-18 12:55:27 +08:00
Adrián Medraño Calvo
983fd468dc Add missing declarations
* exwm-systemtray.el :
	* exwm-manage.el :
	* exwm-layout.el :
	* exwm-input.el :
	* exwm-floating.el :
	* exwm-core.el : Add missing function declarations.
2016-07-17 12:00:00 +00:00
Chris Feng
6c8255bf39 Add/improve some ICCCM/EWMH features
* exwm-floating.el (exwm-floating--set-allowed-actions)
(exwm-floating--set-floating, exwm-floating--unset-floating):
Add _NET_WM_ALLOWED_ACTIONS support.

* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Support initial state hint.
* exwm.el (exwm--update-hints): Fetch initial state.
(exwm--update-state, exwm--on-PropertyNotify):
WM_STATE is not intended to be read.
* exwm-core.el (exwm-state):
* exwm-floating.el (exwm-floating-hide):
* exwm-input.el (exwm-input--update-focus):
* exwm-layout.el (exwm-layout--set-state)
(exwm-layout--iconic-state-p, exwm-layout--show, exwm-layout--hide):
* exwm-manage.el (exwm-manage--on-MapRequest):
Improve WM_STATE support.

* exwm-input.el (exwm-input--set-focus):
* exwm-input.el (exwm-input--update-focus)
(exwm-input--set-active-window):
* exwm.el (exwm--on-ClientMessage): Add _NET_ACTIVE_WINDOW support.

* exwm-layout.el (exwm-layout--set-client-list-stacking):
Improve _NET_CLIENT_LIST_STACKING support.

* exwm-manage.el (exwm-manage--set-client-list)
(exwm-manage--manage-window, exwm-manage--unmanage-window):
Improve _NET_CLIENT_LIST support.

* exwm-manage.el (exwm-manage--manage-window):
* exwm-workspace.el (exwm-workspace--set-desktop)
(exwm-workspace-move-window):
* exwm.el (exwm--on-ClientMessage): Add _NET_WM_DESKTOP support.

* exwm-randr.el (exwm-randr--refresh):
* exwm-workspace.el (exwm-workspace--set-desktop-geometry)
(exwm-workspace--init): Add _NET_DESKTOP_GEOMETRY support.

* exwm-workspace.el (exwm-workspace--set-desktop-geometry):
Renamed from `exwm-workspace--update-desktop-geometry'.
* exwm-randr.el (exwm-randr--refresh): Improve _NET_WORKAREA support.

* exwm-workspace.el (exwm-workspace--set-fullscreen):
Correct variables names.

* exwm-workspace.el (exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Set _NET_NUMBER_OF_DESKTOPS in workspace module.

* exwm-workspace.el (exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Set _NET_DESKTOP_VIEWPORT in workspace module.

* exwm.el (exwm--on-ClientMessage): Improve _NET_CURRENT_DESKTOP
support.

* exwm.el (exwm--on-ClientMessage): Add _NET_CLOSE_WINDOW support.

* exwm.el (exwm--on-ClientMessage): Add WM_CHANGE_STATE support.

* exwm.el (exwm--init-icccm-ewmh): Update supported atoms.
2016-07-13 19:36:50 +08:00
Chris Feng
3dba5f156f Manage a certain type of undecorated X windows
* exwm-core.el (exwm--mwm-hints): Removed.
(exwm--mwm-hints-decorations): New buffer-local variable for
indicating whether the X window should have decorations.
* exwm-floating.el (exwm-floating--set-floating): Hide the mode-line
of undecorated floating X windows by default.
* exwm-manage.el (exwm-manage--update-mwm-hints):
Set exwm--mwm-hints-decorations;
(exwm-manage--manage-window): Manage an undecorated X window if its
input model is not 'No Input' or 'Globally Active'.
2016-05-24 12:30:53 +08:00
Chris Feng
1b2ae3749e Add cleanup codes for Emacs daemon
* exwm-floating.el (exwm-floating--exit):
* exwm-input.el (exwm-input--exit):
* exwm-layout.el (exwm-layout--exit):
* exwm-manage.el (exwm-manage--exit):
* exwm-randr.el (exwm-randr--exit):
* exwm-systemtray.el (exwm-systemtray--exit):
* exwm-workspace.el (exwm-workspace--exit):
New functions for cleanup each module.

* exwm-input.el (exwm-input--on-pre-command, exwm-input--on-post-command)
(exwm-input--init): Name lambda functions.

* exwm-layout.el (exwm-layout--timer, exwm-layout--init): Save timer.

* exwm-randr.el (exwm-randr-enable): Register the cleanup function.

* exwm-systemtray.el (exwm-systemtray--init): Force refresh atoms in XEMBED
and system tray protocols.
(exwm-systemtray-enable): Register the cleanup function.

* exwm-workspace.el (exwm-workspace--client): Save the server process.
(exwm-workspace--confirm-kill-emacs): Add emacsclient-specific
cleanup codes.
(exwm-workspace--timer): Save the timer.
(exwm-workspace--init): Save the server process and timer;
fix problems with emacsclient frames.

* exwm.el (exwm-init): Always select the newly created frame;
force refresh ICCCM & EWMH atoms.
(exwm-exit-hook): New hook for holding cleanup codes.
(exwm--exit): Run `exwm-exit-hook', execute cleanup codes for
each module and reset the environment.
2016-05-23 19:13:42 +08:00
Chris Feng
ddbbeda285 Fix 2 multi-monitor issues
* exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init):
Handle unexpected frame switch in `focus-in-hook'.

* exwm-floating.el (exwm-floating--set-floating): If the absolute position
is (0, 0) then the relative position is also the same.
2016-04-07 21:03:42 +08:00
Chris Feng
6fe6fe52f6 Untabify 2016-03-06 13:45:13 +08:00
Chris Feng
8706e490fb Allow moving/resizing undecorated X windows
* exwm-manage.el (exwm-manage--manage-window): Do not manage
undecorated floating X windows (set in _MOTIF_WM_HINTS).

* exwm-floating.el (exwm-floating--start-moveresize)
(exwm-floating--stop-moveresize, exwm-floating--do-moveresize):
Allow moving/resizing undecorated X windows with _NET_WM_MOVERESIZE
client message.
2016-03-04 19:11:10 +08:00
Chris Feng
5a39c5c2fa Allow user to hide floating X windows
* exwm-core.el (exwm-mode-map): Add a new key to hide floating X windows.
* exwm-floating.el (exwm-floating-hide): New command to hide a floating X
window.

* exwm-workspace.el: Fix a compile warning.
2016-02-25 12:41:35 +08:00
Chris Feng
db6d26c662 Refresh the workspace after creating a floating X window
* exwm-floating.el (exwm-floating--set-floating): Refresh the workspace
(since auto-refresh was disabled).
2016-02-24 21:27:23 +08:00
Chris Feng
55cec760ca Fix emacsclient related issues
* exwm-systemtray.el (exwm-systemtray-height): The value is not available
when emacsclient has just loaded the library (and it crashes emacsclient).

* exwm-workspace.el (exwm-workspace--init): Set `default-minibuffer-frame'
later to prevent it from being modified when using emacsclient.

* exwm-floating.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el: Use `exwm-workspace--minibuffer-own-frame-p' instead of the raw
variable.
2016-02-21 20:19:45 +08:00
Chris Feng
7116b01b0c Various fixes for floating X windows
* exwm-floating.el (exwm-floating--set-floating): Always create floating X
windows on current workspace.

* exwm-workspace.el (exwm-workspace-switch): Restore selected floating
frames.

* exwm-workspace.el (exwm-workspace-move-window): Restore the position of
floating X windows.  Recreate floating frames when using fixed minibuffer.
Restack tiling X windows.
2016-02-21 16:39:34 +08:00
Chris Feng
e3d33a4aad Prevent Emacs frames from restacking themselves
Putting Emacs frames (workspace frames, floating frames) into dedicated
containers greatly simplifies the stacking order management and totally
fixes relevant issues.

* exwm-floating.el (exwm-floating--set-floating): Create floating frame
container.  Remove redundant stacking order modification code.
(exwm-floating--unset-floating): Destroy the floating frame container.
No need to reparent the X window container.
(exwm-floating--do-moveresize): Resize the floating frame container.
* exwm-input.el (exwm-input--update-focus): No need to restack frames.
* exwm-layout.el (exwm-layout--show, exwm-layout--set-frame-fullscreen)
(exwm-layout-enlarge-window): Resize the floating frame container.
* exwm-manage.el (exwm-manage--on-ConfigureRequest): Re-enable stacking
order modification on ConfigureRequest.

* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Reparent out all
frames on exit.  No need to remove selected events or created resources.
(exwm-workspace--init): Create workspace frame containers.

* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--unmanage-window): Remove a redundant call to
`xcb:flush'.

* exwm-manage.el (exwm-manage--unmanage-window): Force unmap the X window.
Unmap the floating frame before reparent it.
2016-02-20 21:52:07 +08:00
Chris Feng
1c79e1c238 Prevent/Reduce flickering issues with floating X windows
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--unset-floating): Prevent flickering when creating/removing
a floating X window.
* exwm-layout.el (exwm-layout--show): Show X windows after resizing to
prevent flickering.
* exwm-manage.el (exwm-manage--unmanage-window): Reduce flickering by
hiding the container.
(exwm-manage--kill-buffer-query-function): Prevent flickering by hiding the
container (except that the X window destroys itself after receiving the
WM_DELETE_WINDOW client message).
2016-02-20 14:52:53 +08:00
Chris Feng
fc589b899b Fix system tray issues after updating workspaces
* exwm-workspace.el (exwm-workspace-switch-hook): New hook run by
`exwm-workspace-switch'.
* exwm-randr.el (exwm-randr-refresh-hook): New hook run by
`exwm-randr--refresh'.
* exwm-systemtray.el (exwm-systemtray--on-randr-refresh)
(exwm-systemtray--on-workspace-switch, exwm-systemtray--init): Update the
system tray in `exwm-randr-refresh-hook' and `exwm-workspace-switch-hook'.

* exwm-layout.el (exwm-layout--set-frame-fullscreen):
* exwm-workspace.el (exwm-workspace--post-init): Wait until all workspace
frames are set fullscreen.

* exwm-workspace.el (exwm-workspace--current-width)
(exwm-workspace--current-height): New functions for retrieving the width
and height of the current workspace.
* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--manage-window)
(exwm-manage--on-ConfigureRequest):
* exwm-systemtray.el (exwm-systemtray--refresh, exwm-systemtray--init):
* exwm-workspace.le (exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify): Switch to
`exwm-workspace--current-width' and `exwm-workspace--current-height'.

* exwm-core.el:
* exwm-floating.el:
* exwm-floating.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el:
Clean up loading file.  Set/Unset some functions as commands.

* README.md: Add intro to system tray.
2016-02-19 17:12:43 +08:00
Chris Feng
3f7722079c Fix floating X window bugs introduced by 9c95c03e
* exwm-floating.el (exwm-floating--set-floating): Make floating frames
invisible before resizing them.
(exwm-floating--fit-frame-to-window): Removed since unused.
* exwm-layout.el (exwm-layout-hide-mode-line, exwm-layout-show-mode-line):
Use set frame height instead of exwm-floating--fit-frame-to-window.

* exwm-core.el (exwm-mode): Replace `exwm-manage--close-window' with
`exwm-manage--kill-buffer-query-function'.
* exwm-floating.el (exwm-floating--unset-floating): Reparent out floating
frames.
* exwm-manage.el (exwm-manage--unmanage-window): Reparent out floating
frames.  Hide floating frames.
(exwm-manage--close-window, exwm-manage--kill-buffer-query-function):
Rename `exwm-manage--close-window' since it's only used in
`kill-buffer-query-functions'.  Reparent out floating frames.
2016-02-18 19:56:01 +08:00
Chris Feng
fb9bfd2911 Eliminate compilation warnings 2016-02-07 11:40:14 +08:00
Chris Feng
e2edf81271 Add some useful key bindings
* exwm-core.el (exwm--floating-mode-line-format, exwm--mode-line-format)
(exwm-mode-map):
* exwm-floating.el (exwm-floating-hide-mode-line)
(exwm-floating-show-mode-line):
* exwm-layout.el (exwm-layout-hide-mode-line, exwm-layout-show-mode-line)
(exwm-layout-toggle-mode-line):
Allow hide/show mode-line for all `exwm-mode' buffers with 'C-c M'.

* exwm-config.el (exwm-config-default): Add simulation keys for 'C-d' and
'C-k'.
2016-02-07 10:45:59 +08:00