mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17:59 +01:00
Fix a regression with systemtray
* exwm-systemtray.el (exwm-systemtray--on-workspace-switch) (exwm-systemtray--on-randr-refresh): Instead of retrieving the real frame height, manually calculate it with workarea height and menu-bar/tool-bar size.
This commit is contained in:
parent
dd6f5c36ed
commit
1f2bd54c11
1 changed files with 25 additions and 15 deletions
|
@ -331,6 +331,7 @@ You shall use the default value if using auto-hide minibuffer."
|
||||||
"Reparent/Refresh the system tray in `exwm-workspace-switch-hook'."
|
"Reparent/Refresh the system tray in `exwm-workspace-switch-hook'."
|
||||||
(exwm--log)
|
(exwm--log)
|
||||||
(unless (exwm-workspace--minibuffer-own-frame-p)
|
(unless (exwm-workspace--minibuffer-own-frame-p)
|
||||||
|
(let ((geometry (frame-geometry exwm-workspace--current)))
|
||||||
(xcb:+request exwm-systemtray--connection
|
(xcb:+request exwm-systemtray--connection
|
||||||
(make-instance 'xcb:ReparentWindow
|
(make-instance 'xcb:ReparentWindow
|
||||||
:window exwm-systemtray--embedder-window
|
:window exwm-systemtray--embedder-window
|
||||||
|
@ -338,20 +339,29 @@ You shall use the default value if using auto-hide minibuffer."
|
||||||
(frame-parameter exwm-workspace--current
|
(frame-parameter exwm-workspace--current
|
||||||
'window-id))
|
'window-id))
|
||||||
:x 0
|
:x 0
|
||||||
:y (- (frame-pixel-height exwm-workspace--current)
|
:y (- (elt (elt exwm-workspace--workareas
|
||||||
exwm-systemtray-height))))
|
exwm-workspace-current-index)
|
||||||
|
3)
|
||||||
|
(or (cddr (assq 'menu-bar-size geometry)) 0)
|
||||||
|
(or (cddr (assq 'tool-bar-size geometry)) 0)
|
||||||
|
exwm-systemtray-height)))))
|
||||||
(exwm-systemtray--refresh))
|
(exwm-systemtray--refresh))
|
||||||
|
|
||||||
(defun exwm-systemtray--on-randr-refresh ()
|
(defun exwm-systemtray--on-randr-refresh ()
|
||||||
"Reposition/Refresh the system tray in `exwm-randr-refresh-hook'."
|
"Reposition/Refresh the system tray in `exwm-randr-refresh-hook'."
|
||||||
(exwm--log)
|
(exwm--log)
|
||||||
(unless (exwm-workspace--minibuffer-own-frame-p)
|
(unless (exwm-workspace--minibuffer-own-frame-p)
|
||||||
|
(let ((geometry (frame-geometry exwm-workspace--current)))
|
||||||
(xcb:+request exwm-systemtray--connection
|
(xcb:+request exwm-systemtray--connection
|
||||||
(make-instance 'xcb:ConfigureWindow
|
(make-instance 'xcb:ConfigureWindow
|
||||||
:window exwm-systemtray--embedder-window
|
:window exwm-systemtray--embedder-window
|
||||||
:value-mask xcb:ConfigWindow:Y
|
:value-mask xcb:ConfigWindow:Y
|
||||||
:y (- (frame-pixel-height exwm-workspace--current)
|
:y (- (elt (elt exwm-workspace--workareas
|
||||||
exwm-systemtray-height))))
|
exwm-workspace-current-index)
|
||||||
|
3)
|
||||||
|
(or (cddr (assq 'menu-bar-size geometry)) 0)
|
||||||
|
(or (cddr (assq 'tool-bar-size geometry)) 0)
|
||||||
|
exwm-systemtray-height)))))
|
||||||
(exwm-systemtray--refresh))
|
(exwm-systemtray--refresh))
|
||||||
|
|
||||||
(defalias 'exwm-systemtray--on-struts-update
|
(defalias 'exwm-systemtray--on-struts-update
|
||||||
|
|
Loading…
Reference in a new issue