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.
This commit is contained in:
parent
bfd43feb49
commit
fc589b899b
10 changed files with 160 additions and 91 deletions
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
(require 'xcb-keysyms)
|
||||
(require 'exwm-core)
|
||||
(eval-when-compile (require 'exwm-workspace))
|
||||
|
||||
(defvar exwm-input-move-event 's-down-mouse-1
|
||||
"Emacs event to start moving a window.")
|
||||
|
|
@ -94,6 +93,11 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
|||
exwm-input--timer
|
||||
(run-with-idle-timer 0.01 nil #'exwm-input--update-focus)))))
|
||||
|
||||
(defvar exwm-workspace--current)
|
||||
(defvar exwm-workspace--switch-history-outdated)
|
||||
(defvar exwm-workspace-current-index)
|
||||
(defvar exwm-workspace--minibuffer)
|
||||
|
||||
(defun exwm-input--update-focus ()
|
||||
"Update input focus."
|
||||
(when (window-live-p exwm-input--focus-window)
|
||||
|
|
@ -158,6 +162,11 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
|||
(setq exwm-input--temp-line-mode nil)
|
||||
(exwm-input--release-keyboard))))
|
||||
|
||||
(declare-function exwm-floating--start-moveresize "exwm-floating.el"
|
||||
(id &optional type))
|
||||
|
||||
(defvar exwm-workspace--list)
|
||||
|
||||
(defun exwm-input--on-ButtonPress (data _synthetic)
|
||||
"Handle ButtonPress event."
|
||||
(let ((obj (make-instance 'xcb:ButtonPress))
|
||||
|
|
@ -262,6 +271,7 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
|||
|
||||
(defun exwm-input-set-key (key command)
|
||||
"Set a global key binding."
|
||||
(interactive "KSet key globally: \nCSet key %s to command: ")
|
||||
(global-set-key key command)
|
||||
(cl-pushnew key exwm-input--global-keys))
|
||||
|
||||
|
|
@ -273,7 +283,6 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
|||
(defvar exwm-input--during-command nil
|
||||
"Indicate whether between `pre-command-hook' and `post-command-hook'.")
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-input--on-KeyPress-line-mode (key-press)
|
||||
"Parse X KeyPress event to Emacs key event and then feed the command loop."
|
||||
(with-slots (detail state) key-press
|
||||
|
|
@ -443,12 +452,13 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
|||
(defun exwm-input-set-simulation-keys (simulation-keys)
|
||||
"Set simulation keys.
|
||||
|
||||
SIMULATION-KEYS is a list of alist (key-sequence1 . key-sequence2)."
|
||||
SIMULATION-KEYS is an alist of the form (original-key . simulated-key)."
|
||||
(setq exwm-input--simulation-keys nil)
|
||||
(dolist (i simulation-keys)
|
||||
(cl-pushnew `(,(vconcat (car i)) . ,(cdr i)) exwm-input--simulation-keys))
|
||||
(exwm-input--update-simulation-prefix-keys))
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-input-send-simulation-key (times)
|
||||
"Fake a key event according to last input key sequence."
|
||||
(interactive "p")
|
||||
|
|
@ -461,6 +471,11 @@ SIMULATION-KEYS is a list of alist (key-sequence1 . key-sequence2)."
|
|||
(dolist (j pair)
|
||||
(exwm-input--fake-key j))))))
|
||||
|
||||
(declare-function exwm-floating--stop-moveresize "exwm-floating.el"
|
||||
(&rest _args))
|
||||
(declare-function exwm-floating--do-moveresize "exwm-floating.el"
|
||||
(data _synthetic))
|
||||
|
||||
(defun exwm-input--init ()
|
||||
"Initialize the keyboard module."
|
||||
;; Refresh keyboard mapping
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue