fix(xrandr): Enable monitor support by default

Refs #280
This commit is contained in:
Michael Carlberg 2017-01-13 04:02:24 +01:00
parent 385572ec64
commit 506ac3e4ac
2 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,7 @@ option(WITH_XCOMPOSITE "XCOMPOSITE support" OFF)
option(WITH_XKB "XKB support" ON) option(WITH_XKB "XKB support" ON)
if(NOT DEFINED ENABLE_XRANDR_MONITORS) if(NOT DEFINED ENABLE_XRANDR_MONITORS)
set(ENABLE_XRANDR_MONITORS OFF CACHE STRING "Enable XRandR monitor feature (requires version 1.5+)") set(ENABLE_XRANDR_MONITORS ON CACHE STRING "Enable XRandR monitor feature (requires version 1.5+)")
endif() endif()
# }}} # }}}

View File

@ -84,6 +84,7 @@ namespace randr_util {
return monitors; return monitors;
} }
#if ENABLE_XRANDR_MONITORS
if (check_monitor_support()) { if (check_monitor_support()) {
for (auto&& mon : conn.get_monitors(root, true).monitors()) { for (auto&& mon : conn.get_monitors(root, true).monitors()) {
try { try {
@ -94,6 +95,7 @@ namespace randr_util {
} }
} }
} }
#endif
for (auto&& output : conn.get_screen_resources(root).outputs()) { for (auto&& output : conn.get_screen_resources(root).outputs()) {
try { try {