Compare commits

...

2 Commits

Author SHA1 Message Date
6fad0ba9f7 Use floating numbers for OSD frame position
If there are multiple monitors with different resolutions, integer
values may cause placing the OSD outside of the visible area.
Floating values are relative to the current monitor size and OSD
is always placed inside the visible area.
2022-06-17 19:30:38 +02:00
2759cce8a6 Set parent frame for OSD
This ensures the OSD is displayed on the current monitor.
2022-06-17 19:29:30 +02:00

View File

@ -60,8 +60,8 @@ The indicator is displayed only on graphical terminals."
:group 'pipewire)
(defcustom pipewire-osd-frame-parameters
`((left . (+ 50))
(top . (- 50)))
`((left . 0.05)
(top . 0.95))
"Alist of frame parameters for the on screen display indicator."
:type '(alist :key-type symbol :value-type sexp)
:group 'pip-frame)
@ -193,6 +193,7 @@ The indicator is displayed only on graphical terminals."
(setq pw-ui--osd-frame (make-frame `((unsplittable . t)
,@pipewire-osd-frame-parameters
(minibuffer . nil)
(parent-frame . ,(selected-frame))
(width . ,(+ 2 (length string)))
(height . 1)
(min-width . 1)