diff --git a/cmake/build/options.cmake b/cmake/build/options.cmake index fe711913..1c71f4aa 100644 --- a/cmake/build/options.cmake +++ b/cmake/build/options.cmake @@ -69,7 +69,7 @@ option(WITH_XCOMPOSITE "XCOMPOSITE support" OFF) option(WITH_XKB "XKB support" ON) 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() # }}} diff --git a/src/x11/extensions/randr.cpp b/src/x11/extensions/randr.cpp index 57ef00cd..4be1f3dd 100644 --- a/src/x11/extensions/randr.cpp +++ b/src/x11/extensions/randr.cpp @@ -84,6 +84,7 @@ namespace randr_util { return monitors; } +#if ENABLE_XRANDR_MONITORS if (check_monitor_support()) { for (auto&& mon : conn.get_monitors(root, true).monitors()) { try { @@ -94,6 +95,7 @@ namespace randr_util { } } } +#endif for (auto&& output : conn.get_screen_resources(root).outputs()) { try {