subtree(3p/exwm): update & hard reset to commit 'a6e66f5e33'
This contains a bunch of upstream changes after the new maintainers of
EXWM took over, including proper mainlined versions of patches I've
been carrying around here manually.
Notably this undoes the Chromium focus fix patch, lets see how that goes.
git-subtree-dir: third_party/exwm
git-subtree-mainline: a756b46bc70a8a1dbb205d50283a3fe65282ed91
git-subtree-split: a6e66f5e33
Change-Id: Ibcaba379b56611b8f1918c3b60469492d64a3eb7
This commit is contained in:
commit
35e7b8a1a8
16 changed files with 483 additions and 163 deletions
45
third_party/exwm/exwm-manage.el
vendored
45
third_party/exwm/exwm-manage.el
vendored
|
|
@ -1,7 +1,7 @@
|
|||
;;; exwm-manage.el --- Window Management Module for -*- lexical-binding: t -*-
|
||||
;;; EXWM
|
||||
|
||||
;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Chris Feng <chris.w.feng@gmail.com>
|
||||
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
(defgroup exwm-manage nil
|
||||
"Manage."
|
||||
:version "25.3"
|
||||
:group 'exwm)
|
||||
|
||||
(defcustom exwm-manage-finish-hook nil
|
||||
|
|
@ -235,6 +234,23 @@ Override current hinds if FORCE is non-nil."
|
|||
(elt value 2))) ;MotifWmHints.decorations
|
||||
(setq exwm--mwm-hints-decorations nil))))))))
|
||||
|
||||
(defun exwm-manage--update-default-directory (id)
|
||||
"Update the `default-directory' of X window ID.
|
||||
Sets the `default-directory' of the EXWM buffer associated with X window to
|
||||
match its current working directory.
|
||||
|
||||
This only works when procfs is mounted, which may not be the case on some BSDs."
|
||||
(with-current-buffer (exwm--id->buffer id)
|
||||
(if-let* ((response (xcb:+request-unchecked+reply exwm--connection
|
||||
(make-instance 'xcb:ewmh:get-_NET_WM_PID
|
||||
:window id)))
|
||||
(pid (slot-value response 'value))
|
||||
(cwd (file-symlink-p (format "/proc/%d/cwd" pid)))
|
||||
((file-accessible-directory-p cwd)))
|
||||
(setq default-directory (file-name-as-directory cwd))
|
||||
(setq default-directory (expand-file-name "~/")))))
|
||||
|
||||
|
||||
(defun exwm-manage--set-client-list ()
|
||||
"Set _NET_CLIENT_LIST."
|
||||
(exwm--log)
|
||||
|
|
@ -394,23 +410,20 @@ Override current hinds if FORCE is non-nil."
|
|||
(if (plist-get exwm--configurations 'char-mode)
|
||||
(exwm-input-release-keyboard id)
|
||||
(exwm-input-grab-keyboard id))
|
||||
(let ((simulation-keys (plist-get exwm--configurations 'simulation-keys))
|
||||
(prefix-keys (plist-get exwm--configurations 'prefix-keys)))
|
||||
(with-current-buffer (exwm--id->buffer id)
|
||||
(when simulation-keys
|
||||
(exwm-input-set-local-simulation-keys simulation-keys))
|
||||
(when prefix-keys
|
||||
(setq-local exwm-input-prefix-keys prefix-keys))))
|
||||
(when-let ((simulation-keys (plist-get exwm--configurations 'simulation-keys)))
|
||||
(exwm-input-set-local-simulation-keys simulation-keys))
|
||||
(when-let ((prefix-keys (plist-get exwm--configurations 'prefix-keys)))
|
||||
(setq-local exwm-input-prefix-keys prefix-keys))
|
||||
(setq exwm-workspace--switch-history-outdated t)
|
||||
(exwm--update-desktop id)
|
||||
(exwm-manage--update-ewmh-state id)
|
||||
(with-current-buffer (exwm--id->buffer id)
|
||||
(when (or (plist-get exwm--configurations 'fullscreen)
|
||||
(exwm-layout--fullscreen-p))
|
||||
(setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN
|
||||
exwm--ewmh-state))
|
||||
(exwm-layout-set-fullscreen id))
|
||||
(run-hooks 'exwm-manage-finish-hook)))))
|
||||
(exwm-manage--update-default-directory id)
|
||||
(when (or (plist-get exwm--configurations 'fullscreen)
|
||||
(exwm-layout--fullscreen-p))
|
||||
(setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN
|
||||
exwm--ewmh-state))
|
||||
(exwm-layout-set-fullscreen id))
|
||||
(run-hooks 'exwm-manage-finish-hook))))
|
||||
|
||||
(defun exwm-manage--unmanage-window (id &optional withdraw-only)
|
||||
"Unmanage window ID.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue