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
|
@ -28,7 +28,6 @@
|
|||
|
||||
(require 'xcb-cursor)
|
||||
(require 'exwm-core)
|
||||
(eval-when-compile (require 'exwm-workspace))
|
||||
|
||||
(defvar exwm-floating-border-width 1 "Border width of the floating window.")
|
||||
(defvar exwm-floating-border-color "navy"
|
||||
|
@ -50,12 +49,17 @@
|
|||
(defvar exwm-floating--cursor-bottom-left nil)
|
||||
(defvar exwm-floating--cursor-left nil)
|
||||
|
||||
(declare-function exwm-layout--refresh "exwm-layout.el")
|
||||
(defvar exwm-workspace--current)
|
||||
(defvar exwm-workspace--list)
|
||||
(defvar exwm-workspace-current-index)
|
||||
(defvar exwm-workspace--switch-history-outdated)
|
||||
(defvar exwm-workspace-minibuffer-position)
|
||||
|
||||
(declare-function exwm-layout--refresh "exwm-layout.el")
|
||||
(declare-function exwm-layout--show "exwm-layout.el")
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-floating--set-floating (id)
|
||||
"Make window ID floating."
|
||||
(interactive)
|
||||
(let ((window (get-buffer-window (exwm--id->buffer id))))
|
||||
(when window ;window in non-floating state
|
||||
(set-window-buffer window (other-buffer)))) ;hide it first
|
||||
|
@ -85,7 +89,7 @@
|
|||
(unsplittable . t))))) ;and fix the size later
|
||||
(outer-id (string-to-number (frame-parameter frame 'outer-window-id)))
|
||||
(container (with-current-buffer (exwm--id->buffer id)
|
||||
exwm--container))
|
||||
exwm--container))
|
||||
(window (frame-first-window frame)) ;and it's the only window
|
||||
(x (slot-value exwm--geometry 'x))
|
||||
(y (slot-value exwm--geometry 'y))
|
||||
|
@ -194,10 +198,8 @@
|
|||
(select-frame-set-input-focus frame))
|
||||
(run-hooks 'exwm-floating-setup-hook))
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-floating--unset-floating (id)
|
||||
"Make window ID non-floating."
|
||||
(interactive)
|
||||
(let ((buffer (exwm--id->buffer id)))
|
||||
(with-current-buffer buffer
|
||||
;; Reparent the frame back to the root window.
|
||||
|
@ -257,7 +259,6 @@
|
|||
(defvar exwm-floating--moveresize-calculate nil
|
||||
"Calculate move/resize parameters [buffer event-mask x y width height].")
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-floating--start-moveresize (id &optional type)
|
||||
"Start move/resize."
|
||||
(let ((buffer (exwm--id->buffer id))
|
||||
|
@ -404,7 +405,6 @@
|
|||
:cursor cursor
|
||||
:time xcb:Time:CurrentTime)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-floating--stop-moveresize (&rest _args)
|
||||
"Stop move/resize."
|
||||
(xcb:+request exwm--connection
|
||||
|
@ -434,7 +434,6 @@
|
|||
(xcb:flush exwm--connection)
|
||||
(setq exwm-floating--moveresize-calculate nil))
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-floating--do-moveresize (data _synthetic)
|
||||
"Perform move/resize."
|
||||
(when exwm-floating--moveresize-calculate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue