diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-11-18T00·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-11-18T00·00+0000 |
commit | 786c2b4f7d2e92f77746918b442419fa3b5794e5 (patch) | |
tree | a6db4d0b96bb5299f964a134ea2c53e442da50fa /exwm-randr.el | |
parent | dc3b86d1b88c725fbba9685c38f09970dfe73d73 (diff) |
Fallback to the first monitor as the primary one
* exwm-randr.el (exwm-randr--get-monitors): When no primary monitor is specified, pick the first one.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r-- | exwm-randr.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/exwm-randr.el b/exwm-randr.el index 106ed6f83aed..f488bd9deda1 100644 --- a/exwm-randr.el +++ b/exwm-randr.el @@ -123,8 +123,9 @@ corresponding monitors whenever the monitors are active. :width width :height height) monitor-plist (plist-put monitor-plist monitor-name geometry)) - ;; Save primary monitor when available. - (when (/= 0 primary) + ;; Save primary monitor when available (fallback to the first one). + (when (or (/= 0 primary) + (not primary-monitor)) (setq primary-monitor monitor-name))))) (exwm--log "Primary monitor: %s" primary-monitor) (exwm--log "Monitors: %s" monitor-plist) |