mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-24 03:47:59 +01:00
Improve multi-monitor performance
* exwm-randr.el (exwm-randr--refresh): Use GetScreenResourcesCurrent instead of GetScreenResources to avoid polling hardware changes. (exwm-randr--init): GetScreenResourcesCurrent requires RandR 1.3 .
This commit is contained in:
parent
ad90af19a6
commit
98c8fd4bc5
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ the first one in result being the primary output."
|
||||||
;; Query all outputs
|
;; Query all outputs
|
||||||
(with-slots (config-timestamp outputs)
|
(with-slots (config-timestamp outputs)
|
||||||
(xcb:+request-unchecked+reply exwm--connection
|
(xcb:+request-unchecked+reply exwm--connection
|
||||||
(make-instance 'xcb:randr:GetScreenResources
|
(make-instance 'xcb:randr:GetScreenResourcesCurrent
|
||||||
:window exwm--root))
|
:window exwm--root))
|
||||||
(dolist (output outputs)
|
(dolist (output outputs)
|
||||||
(with-slots (crtc connection name)
|
(with-slots (crtc connection name)
|
||||||
|
@ -178,8 +178,8 @@ the first one in result being the primary output."
|
||||||
(with-slots (major-version minor-version)
|
(with-slots (major-version minor-version)
|
||||||
(xcb:+request-unchecked+reply exwm--connection
|
(xcb:+request-unchecked+reply exwm--connection
|
||||||
(make-instance 'xcb:randr:QueryVersion
|
(make-instance 'xcb:randr:QueryVersion
|
||||||
:major-version 1 :minor-version 2))
|
:major-version 1 :minor-version 3))
|
||||||
(if (or (/= major-version 1) (< minor-version 2))
|
(if (or (/= major-version 1) (< minor-version 3))
|
||||||
(error "[EXWM] The server only support RandR version up to %d.%d"
|
(error "[EXWM] The server only support RandR version up to %d.%d"
|
||||||
major-version minor-version)
|
major-version minor-version)
|
||||||
;; External monitor(s) may already be connected.
|
;; External monitor(s) may already be connected.
|
||||||
|
|
Loading…
Reference in a new issue