aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-randr.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-23 15:43:04 +0100
committerMattias Andrée <m@maandree.se>2025-03-23 15:43:04 +0100
commitc6baeaa6c016e2d4b7156019127454ef46e6e94a (patch)
treeaf4681c94ee40413159e9fdd11562785a34752a1 /src/gamma-randr.c
parentm fix (diff)
downloadredshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.gz
redshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.bz2
redshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.xz
Exclude unavailable adjustment methods when listing and trying
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/gamma-randr.c')
-rw-r--r--src/gamma-randr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gamma-randr.c b/src/gamma-randr.c
index 5580a4f..f10a95b 100644
--- a/src/gamma-randr.c
+++ b/src/gamma-randr.c
@@ -21,6 +21,13 @@
static int
+randr_is_available(void)
+{
+ return libgamma_is_method_available(LIBGAMMA_METHOD_X_RANDR);
+}
+
+
+static int
randr_create(struct gamma_state **state_out)
{
return direct_create(state_out, LIBGAMMA_METHOD_X_RANDR, "randr");