summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setxkbmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/setxkbmap.c b/setxkbmap.c
index 96761a0..6b6259c 100644
--- a/setxkbmap.c
+++ b/setxkbmap.c
@@ -1090,9 +1090,12 @@ is_xwayland(void)
/* e.g. Xnest, but definitely not Xwayland */
goto out;
}
+ if (major < 1 || (major == 1 && minor < 3)) {
+ goto out;
+ }
resources = XRRGetScreenResourcesCurrent(dpy, DefaultRootWindow(dpy));
- if (!resources) {
+ if (!resources || resources->noutput < 1) {
goto out;
}