about summary refs log tree commit diff
path: root/exwm-manage.el
AgeCommit message (Collapse)AuthorFilesLines
2019-02-06 Add input method supportChris Feng1-8/+1
; The code is basically refactored from ; https://github.com/ch11ng/exim to get better maintenance. * exwm-xim.el: New module making Emacs's builtin input methods usable for interacting with X windows. * exwm-core.el (exwm--intern-atom): New function for intern X11 atoms. * exwm-input.el (exwm-input--init): * exwm-manage.el (exwm-manage--init): Use it.
2019-02-01 Fetch necessary properties before checking per-app configurationsChris Feng1-2/+2
* exwm-manage.el (exwm-manage--manage-window): Fetch X window title & protocols so they can be available when checking per-application configurations.
2019-02-01 Update copyright year to 2019Chris Feng1-1/+1
2018-12-16 Avoid unnecessary focus changes when creating/killing buffersChris Feng1-2/+5
* exwm-input.el (exwm-input--skip-buffer-list-update): New internal variable for skipping the next 'buffer-list-update'. (exwm-input--on-buffer-list-update): Skip when `exwm-input--skip-buffer-list-update` is set. * exwm-manage.el (exwm-manage--manage-window): Set `exwm-input--skip-buffer-list-update` when creating/killing buffers.
2018-12-02 ; Improve debug logs.Chris Feng1-3/+4
2018-11-18 Add support for 'managed' per-application configurationChris Feng1-17/+26
* exwm-manage.el (exwm-manage-configurations): Add a new value type 'managed' to allow users to specify whether a certain X window should be managed or not. (exwm-manage--manage-window): Use it.
2018-11-11 Fix wrong stacking order of tiling X windowsChris Feng1-5/+14
* exwm-manage.el (exwm-manage--on-MapNotify): Avoid restacking tiling X windows on the top when force triggering hierarchy change events.
2018-09-16 Simplify debugging and fix dynamic-scoping `eval'Chris Feng1-1/+1
* exwm-core.el (exwm-debug): New global minor mode to replace `exwm-debug-on' and `exwm-debug-toggle'. * exwm-manage.el (exwm-manage--get-configurations): Use lexical-scoping `eval'.
2018-09-04 Restack X-Windows after being mapped to ensure EnterNotify events fireAdrián Medraño Calvo1-0/+17
* exwm-manage.el (exwm-manage--on-MapNotify, exwm-manage--init): Restack X windows after being mapped in order to ensure they receive an EnterNotify event (does not happen under XQuartz).
2018-08-13 Trace more functionsAdrián Medraño Calvo1-1/+15
2018-07-29 Fix issues with destroying full screen X windowsChris Feng1-0/+4
* exwm-manage.el (exwm-manage--unmanage-window): Set the Emacs window of an full screen X window as non-dedicated before killing its buffer so as not to cause other side effects.
2018-07-15 Shrink Emacs frames with X requestChris Feng1-11/+7
* exwm-manage.el (exwm-manage--on-ConfigureRequest): There's a problem in shrinking Emacs frames with `set-frame-width' and `set-frame-height'. Use `exwm--set-geometry' instead.
2018-05-20 Provide a fallback value for X window geometryChris Feng1-2/+8
* exwm-manage.el (exwm-manage--update-geometry): Ditto.
2018-03-23 Add workspace support in per-application configurationsChris Feng1-3/+9
* exwm-manage.el (exwm-manage-configurations) (exwm-manage--manage-window): Allow to specify which workspace an applications should be created on.
2018-03-09 Minor fixesChris Feng1-4/+0
2018-03-06 Cleanup exwm-manage on exitAdrián Medraño Calvo1-2/+11
* exwm-manage.el (exwm-manage--unmanage-window): Map windows when quitting. (exwm-manage--exit): Remap all windows. * exwm.el (exwm--exit): Reorder deinitialization sequence so that windows are reparented before the workspaces are removed.
2018-03-04 Fix fullscreen mode after switching workspace and backChris Feng1-3/+4
* 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-03-04 Add header-line format support in per-application configurationsChris Feng1-0/+3
* 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-03 Add various per-application configurationsChris Feng1-4/+19
* 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-02 Add initial support for per-application configurationsChris Feng1-7/+43
* exwm-core.el (exwm--configurations): New buffer-local variable recording the configurations of an X window. * exwm-manage.el (exwm-manage-configurations): New user option as the per-application configurations. (exwm-manage--get-configurations): New function for fetching the configurations of this X window. (exwm-manage--manage-window): Fetch the configurations and check if the X window should be floating/tiling.
2018-02-26 Make `exwm-manage-ping-timeout' a user optionChris Feng1-2/+4
* exwm-manage.el (exwm-manage-ping-timeout): Now a user option.
2018-02-20 Remove redundant code for fullscreen modeChris Feng1-3/+0
* exwm-manage.el (exwm-manage--unmanage-window) (exwm--on-ClientMessage): No need to modify workspace when an X window enters/leaves fullscreen mode.
2018-02-19 Fix various issues with multi-monitor supportChris Feng1-10/+16
* 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-13/+2
; 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-52/+54
; Also fix documentations.
2018-02-18 Make X windows container-lessChris Feng1-124/+21
; 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.
2017-12-31 Update copyright year to 2018Chris Feng1-1/+1
2017-11-24 Fix possible wrong context when killing buffersChris Feng1-5/+6
* exwm-manage.el (exwm-manage--unmanage-window): Make sure to use the correct context to read/set buffer-local variables when killing buffers.
2017-11-19 Fix various input focus issuesChris Feng1-1/+1
* 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-11-05 Fix for "Selecting deleted buffer" exceptionRam Krishnan1-15/+7
2017-08-31 Avoid reusing dedicated windowChris Feng1-3/+1
* 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-04-10 Only add graphic frames to `exwm-manage--frame-outer-id-list'Chris Feng1-5/+7
* exwm-manage.el (exwm-manage--add-frame, exwm-manage--remove-frame): Add checks for graphic frames.
2017-02-05 Update copyright year to 2017Chris Feng1-1/+1
2016-12-26 Fix a bug with zero floating border widthChris Feng1-1/+2
* exwm-manage.el (exwm-manage--manage-window): Avoid setting ColorMap mask when creating an X window if floating border is zero.
2016-09-25 Fix a frame resizing problem for Lucid buildChris Feng1-8/+29
* exwm-manage.el (exwm-manage--frame-outer-id-list): New variable for storing frame window-outer-id's. (exwm-manage--add-frame, exwm-manage--remove-frame): New functions for adding/removing ids to/from the variable. (exwm-manage--init): Add the functions to the corresponding hooks. (exwm-manage--on-ConfigureRequest): Check for frames and avoid handling them.
2016-09-25 Fix `exwm-manage--kill-buffer-query-function'Chris Feng1-17/+17
* exwm-manage.el (exwm-manage--kill-buffer-query-function): Check buffer-local variables for destroyed X windows; Avoid force killing clients that support WM_DELETE_WINDOW but not _NET_WM_PING; Use `y-or-n-p' instead for querying.
2016-09-23 Use X window bordersChris Feng1-2/+9
; 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-08-12 Check for _NET_WM_STATE_FULLSCREEN on managingChris Feng1-3/+18
* 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-12 * exwm-manage.el (exwm-manage--unmanage-window): Do not clear strutsChris Feng1-1/+2
when unmapping.
2016-08-12 Always put the desktop at bottomChris Feng1-0/+12
* exwm-manage.el (exwm-manage--desktop): New variable for recording the desktop X window. (exwm-manage--manage-window): Check for desktop. * exwm-workspace.el (exwm-workspace--resize-minibuffer-frame) (exwm-workspace--hide-minibuffer): Put the minibuffer container above desktop if any.
2016-08-12 * exwm-manage.el (exwm-manage--scan): Check for possiblyChris Feng1-9/+16
destroyed child.
2016-08-12 Fix CreateWindow attributesChris Feng1-5/+13
; 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-09 Fix coordinates calculations concerning workspacesChris Feng1-8/+8
* 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-07-30 Add restart supportChris Feng1-0/+5
* exwm-input.el (exwm-input--exit): Cancel timers. * exwm-manage.el (exwm-manage--manage-window): Add reparented X windows to save-set. * exwm-systemtray.el (exwm-systemtray--embed): Add embeded icons to save-set. * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): No need to unmanage; also hide Emacs frames; always call `exwm--exit'. * exwm.el (exwm-restart): New command for restarting EXWM. (exwm--exit-icccm-ewmh): New function for cleaning up ICCCM/EWMH properties. (exwm-exit-hook): Update doc string. (exwm--exit): Call `exwm--exit-icccm-ewmh' and do not reset variables.
2016-07-30 Exit the active minibuffer on unmanaging X windowsChris Feng1-8/+20
* exwm-manage.el (exwm-manage--unmanage-window): Exit the minibuffer as a precaution to prevent the "selecting deleted buffer" error.
2016-07-30 ; * exwm-manage.el (exwm-manage--manage-window): Check the value rangeChris Feng1-1/+5
; of _NET_WM_DESKTOP.
2016-07-26 Add an option to force using tiling layoutChris Feng1-3/+10
* exwm-manage.el (exwm-manage-force-tiling): New variable indicating whether X windows should always be managed in tiling layout. (exwm-manage--manage-window): Add a condition.
2016-07-21 Minor cleanupsChris Feng1-2/+2
; Eliminate compile warnings. ; Rename frame parameter 'exwm--urgency' to 'exwm-urgency'. ; Simplify expressions.
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-1/+1
* 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.