about summary refs log tree commit diff
path: root/exwm-layout.el
AgeCommit message (Collapse)AuthorFilesLines
2019-03-17 Remove loading order dependency on `mouse-autoselect-window'Chris Feng1-1/+1
* 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-02-01 Update copyright year to 2019Chris Feng1-1/+1
2018-12-30 Automatically iconify floating X windowsChris Feng1-1/+21
* exwm-layout.el (exwm-layout-auto-iconify): New user option to specify whether to automatically iconify X windows. (exwm-layout--auto-iconify): Automatically iconify floating X windows when its main X window (if any) is iconified. (exwm-layout--show, exwm-layout--hide): Use it.
2018-12-02 ; Improve debug logs.Chris Feng1-0/+3
2018-11-04 Select more sensible buffers after creating new windowsChris Feng1-3/+9
* exwm-layout.el (exwm-layout--refresh-other) (exwm-layout--refresh-workspace): When filling vacated windows select more sensible buffer by calling `switch-to-next-buffer' for newly created windows.
2018-10-21 Restore keyboard grabbing after exiting fullscreenAdrián Medraño Calvo1-1/+1
Recover the difference between the input mode selected by the user and actual one, which might be transient. This was inadvertently removed in recent changes. * exwm-core.el (exwm--selected-input-mode): New variable. * exwm-input.el (exwm-input-grab-keyboard) (exwm-input-release-keyboard): Use it. * exwm-layout.el (exwm-layout-unset-fullscreen): Return to the selected input mode.
2018-10-21 Do away with `exwm-input--input-mode'Adrián Medraño Calvo1-2/+1
* exwm-input.el (exwm-input--update-mode-line): Remove. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress) (exwm-input--update-mode-line, exwm-input-toggle-keyboard): Use `exwm--input-mode' variable directly.
2018-10-08 Simplify input handlingAdrián Medraño Calvo1-1/+2
No functional change. * exwm-input.el (exwm-input--current-input-mode): New function indicating keyboard input mode. (exwm-input--on-KeyPress, exwm-input--update-mode-line): Use `exwm-input--current-input-mode'. (exwm-input-grab-keyboard, exwm-input-release-keyboard) (exwm-input--update-mode-line): Simplify. * exwh-core.el (exwm--on-KeyPress): Remove variable, use `exwm--keyboard-grabbed' and `exwm-input--current-input-mode' instead.
2018-08-30 Refresh layout after activating/deactivating workspacesAdrián Medraño Calvo1-3/+4
* exwm-workspace.el (exwm-workspace--set-active): Refresh layout after activating or deactivating workspaces. * exwm-layout.el (exwm-layout--refresh-workspace): Hide X windows on inactive workspaces.
2018-08-19 Merge branch 'medranocalvo/fix-x-window-vanish' into externals/exwmChris Feng1-53/+72
2018-08-19 ; Comment layout algorithm.Adrián Medraño Calvo1-6/+12
2018-08-16 Split exwm-layout--refresh into three functionsAdrián Medraño Calvo1-46/+57
* exwm-layout.el (exwm-layout--refresh): Split in three functions for clarity. (exwm-layout--refresh-workspace, exwm-layout--refresh-other) (exwm-layout--refresh-floating): New functions.
2018-08-16 Don't assume order of `get-buffer-window-list' resultsAdrián Medraño Calvo1-2/+4
It only guarantees that the first result *if* the buffer appears on the selected window.
2018-08-16 Use more explicit argument for excluding minibuffersAdrián Medraño Calvo1-4/+4
* exwm-layout.el (exwm-layout--refresh): Use a more intuitive value for specifying exclusion of minibuffers.
2018-08-16 Consider windows of the frame being refreshed, not the selected one at the ↵Adrián Medraño Calvo1-1/+1
time exwm-layout--refresh runs * exwm-layout.el (exwm-layout--refresh): Consider windows of the frame being refreshed instead of the selected frame.
2018-08-13 Trace more functionsAdrián Medraño Calvo1-0/+14
2018-08-12 Exclude irrelevant X windows when refreshingChris Feng1-1/+2
* exwm-layout.el (exwm-layout--refresh): Only check X windows on the workspace being examined.
2018-08-05 When mapping an X window check if it's on an active workspaceChris Feng1-4/+7
* exwm-layout.el (exwm-layout--refresh): Avoid mapping X windows on inactive workspaces.
2018-07-15 ; Use `derived-mode-p'.Chris Feng1-9/+10
2018-05-20 Provide a fallback value for X window geometryChris Feng1-2/+2
* exwm-manage.el (exwm-manage--update-geometry): Ditto.
2018-05-13 Avoid hiding full screen X windows unexpectedlyChris Feng1-0/+2
* exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): Set the Emacs window of a full screen X window dedicated to its buffer such that newly created X windows won't replace it.
2018-04-15 Port to 32-bit Emacs on master branchPaul Eggert1-1/+1
2018-04-01 Preserve keyboard grab state after quitting fullscreen modeChris Feng1-3/+4
* exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Ditto.
2018-03-10 Fix regressionsChris Feng1-3/+3
(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-09 Minor fixesChris Feng1-0/+1
2018-03-06 Cleanup exwm-layout on exitAdrián Medraño Calvo1-0/+2
* exwm-layout.el (exwm-layout--exit): Remove `window-pixel-width-before-size-change' hook.
2018-03-04 Fix fullscreen mode after switching workspace and backChris Feng1-5/+19
* exwm-layout.el (exwm-layout--show): Always set an X window in fullscreen mode the size in fullscreen. (exwm-layout-unset-fullscreen): Leave the fullscreen mode first. * exwm-layout.el (exwm-layout--fullscreen-p): New function telling whether the current buffer is in fullscreen mode. (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen) (exwm-layout-toggle-fullscreen): * exwm-manage.el (exwm-manage--manage-window) (exwm-manage--on-ConfigureRequest): * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) (exwm-workspace-move): * exwm.el (exwm-reset, exwm--on-ClientMessage): Use it.
2018-02-19 Fix various issues with multi-monitor supportChris Feng1-7/+2
* 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 Support displaying floating X windows on all workspacesChris Feng1-1/+3
; Setting _NET_WM_DESKTOP to 0xffffffff makes an X windows appearing ; on all desktops (EWMH). It's tricky to do it for tiling X windows ; so it's not implemented. * exwm-core.el (exwm--desktop): New buffer-local variable recording the value of _NET_WM_DESKTOP. * exwm-layout.el (exwm-layout--hide): Do not hide X windows with this property set to 0xffffffff. * exwm.el (exwm--update-desktop): New function for fetching the value of _NET_WM_DESKTOP and setting `exwm--desktop'. * exwm-manage.el (exwm-manage--manage-window): Use it. * exwm-workspace.el (exwm-workspace--set-desktop): Also update `exwm--desktop'.
2018-02-19 Add customization settingsChris Feng1-35/+40
; Also fix documentations.
2018-02-18 Make X windows container-lessChris Feng1-143/+35
; 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-04 Avoid crashing Emacs by resizing its frame into 0x0Chris Feng1-2/+2
* 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-01-14 Raise docks after quitting full screen modeChris Feng1-0/+8
* exwm-layout.el (exwm-layout-unset-fullscreen): Raise docks lowered when entering full screen mode.
2017-12-31 Update copyright year to 2018Chris Feng1-1/+1
2017-11-19 Fix various input focus issuesChris Feng1-5/+4
* exwm-input.el (exwm-input--on-buffer-list-update): Cancel the frame redirection introduced by 421c0512f7. * exwm-input.el (exwm-input--on-buffer-list-update): Only ignore temp buffers just switched from. * exwm-input.el (exwm-input--update-focus-commit): New function for ensuring the input focus lock can always be released. (exwm-input--update-focus-defer, exwm-input--update-focus): Use it. * exwm-input.el (exwm-input--update-focus): No need to select frames; only transfer X input focus. * exwm-core.el (exwm--defer): New macro for correcting the use of `run-with-idle-timer' by taking `current-idle-time' into account. * exwm-input.el (exwm-input--update-focus-defer) (exwm-input--update-focus): * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): * exwm-manage.el (exwm-manage--unmanage-window) (exwm-workspace--prompt-delete): * exwm-workspace.el (exwm-workspace-switch) (exwm-workspace--add-frame-as-workspace): Use it.
2017-02-05 Fix checkdoc warningsChris Feng1-2/+2
2017-02-05 Update copyright year to 2017Chris Feng1-1/+1
2016-09-23 Use X window bordersChris Feng1-3/+7
; 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 Remember the geometries of floating X windowsChris Feng1-0/+2
* exwm-floating.el (exwm-floating--stop-moveresize): * exwm-layout.el (exwm-layout-enlarge-window): Update the geometry after resizing.
2016-08-24 Add toggle commandsChris Feng1-0/+10
* exwm-input.el (exwm-input-toggle-keyboard): New command for toggling keyboard mode. * exwm-layout.el (exwm-layout-toggle-fullscreen): New command for toggling fullscreen mode. * exwm-core.el (exwm-mode-menu, exwm-mode-map): Use them.
2016-08-12 Check for _NET_WM_STATE_FULLSCREEN on managingChris Feng1-4/+5
* exwm-core.el (exwm--fullscreen): Removed. (exwm--ewmh-state): New variable for recording the _NET_WM_STATE hint. * exwm-core.el (exwm-mode-menu, exwm-mode-map): * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): * exwm-manage.el (exwm-manage--unmanage-window) (exwm-manage--on-ConfigureRequest): * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) (exwm-workspace-move): * exwm.el (exwm-reset, exwm--on-ClientMessage): Use the new variable. * exwm-manage.el (exwm-manage--update-ewmh-state): New function for updating _NET_WM_STATE. (exwm-manage--manage-window): Update _NET_WM_STATE and check for _NET_WM_STATE_FULLSCREEN.
2016-08-10 Adapt for the changes in `window-configuration-change-hook'Chris Feng1-4/+10
* exwm-layout.el (exwm-layout--refresh): Accept frame as an optional argument. (exwm-layout--init): Add `exwm-layout--refresh' to `window-size-change-functions' when appropriate.
2016-08-06 * exwm-layout.el (exwm-layout--show): Fix the position of floatingChris Feng1-15/+23
X windows.
2016-08-01 Fix emacsclient issuesChris Feng1-3/+5
* exwm-workspace.el (exwm-workspace--client-p): New function for testing emacsclient frames. (exwm-workspace--update-minibuffer-height) (exwm-workspace--on-minibuffer-setup) (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) (exwm-workspace--on-echo-area-clear): * exwm-input.el (exwm-input--on-buffer-list-update) (exwm-input--on-minibuffer-setup): * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): Use it. * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Always clear the 'client' frame parameter. (exwm-workspace--init): Fix a typo.
2016-07-21 Fix input focus issues revealed by recent commitsChris Feng1-3/+1
* exwm-input.el (exwm-input--update-focus-window) (exwm-input--on-buffer-list-update, exwm-input--update-focus-interval) (exwm-input--update-focus-lock, exwm-input--update-focus-defer-timer) (exwm-input--update-focus-timer, exwm-input--update-focus-defer) (defun exwm-input--update-focus): Rework the input focus update mechanism, mainly to overcome the input focus update contention. * exwm-input.el (defun exwm-input--update-focus): Use `select-window' instead of `exwm-workspace-switch'; calling the latter is too expensive. * exwm-layout.el (exwm-layout--on-minibuffer-setup): Drop a unnecessary line. * exwm-workspace.el (exwm-workspace-switch): Set input focus to the new workspace frame.
2016-07-19 Fix various minor issuesChris Feng1-1/+1
; Coding style fixes * exwm-core.el (exwm-mode-menu exwm-mode-map): Use `exwm-workspace--count'. * exwm-workspace.el (exwm-workspace--set-fullscreen) (exwm-workspace--on-focus-in, exwm-workspace--set-desktop): Use `exwm-workspace--position'. * exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move): Renamed from `exwm-workspace-swap-workspace' and `exwm-workspace-move-workspace'. * exwm-workspace.el (exwm-workspace--update-ewmh-props): Update comments. * exwm-workspace.el (exwm-workspace--switch-map-nth-prefix): Fix a calculation. * exwm-workspace.el (exwm-workspace-switch): Fix a potential timer problem. * exwm-workspace.el (exwm-workspace-swap, exwm-workspace-move) (exwm-workspace--remove-frame-as-workspace): Update workspace and clients involved. * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Remove workspace first.
2016-07-17 Work with workspace frames instead of indicesAdrián Medraño Calvo1-4/+2
* exwm.el (exwm--on-ClientMessage): * exwm-workspace.el (exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): * exwm-layout.el (exwm-layout--refresh): * exwm-input.el (exwm-input--update-focus) (exwm-input--on-ButtonPress): Accept frame as well as workspace index as argument. * exwm-workspace.el (exwm-workspace--workspace-from-frame-or-index): New function.
2016-07-17 New function exwm-workspace--workspace-pAdrián Medraño Calvo1-2/+3
* exwm-workspace.el (exwm-workspace--workspace-p): New function. * exwm-input.el (exwm-input--on-ButtonPress): * exwm-workspace.el (exwm-workspace-switch): * exwm-layout.el (exwm-layout--refresh): Use it.
2016-07-17 Add `exwm-workspace--position' helperAdrián Medraño Calvo1-1/+2
* exwm-workspace.el (exwm-workspace--position): New function. * exwm-layout.el (exwm-layout--refresh): * exwm-input.el (exwm-input--on-ButtonPress): * exwm-workspace.el (exwm-workspace--update-switch-history): * exwm.el (exwm--on-ClientMessage, exwm-workspace--init): Use it.
2016-07-17 Add missing declarationsAdrián Medraño Calvo1-0/+8
* exwm-systemtray.el : * exwm-manage.el : * exwm-layout.el : * exwm-input.el : * exwm-floating.el : * exwm-core.el : Add missing function declarations.