Skip to content

Commit 6c1db90

Browse files
authored
Allow using on XWayland. (#355)
This removes behavior introduced by #341. After #341 was released, several folks reported that xdotool has indeed worked correctly on XWayland in the past. I've left the "is on wayland?" detection code that is otherwise now unused, in case we want it later. Fixes #346.
1 parent eb04281 commit 6c1db90

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

xdo.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@ xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
119119

120120
// This library and xdotool do not work correctly on Wayland/XWayland.
121121
// Try to detect XWayland and warn the user about problems.
122-
if (appears_to_be_wayland(xdpy)) {
123-
fprintf(stderr, "The X server at %s appears to be XWayland. Unfortunately, XWayland does not correctly support the features used by libxdo and xdotool.\n", display);
124-
return NULL;
125-
}
122+
// TODO(sissel): This was disabled due to issue #346
123+
// -- xdotool works on XWayland for some operations, so it isn't helpful to refuse all usage on XWayland.
124+
//if (appears_to_be_wayland(xdpy)) {
125+
//fprintf(stderr, "The X server at %s appears to be XWayland. Unfortunately, XWayland does not correctly support the features used by libxdo and xdotool.\n", display);
126+
//return NULL;
127+
//}
126128

127129

128130
/* XXX: Check for NULL here */

0 commit comments

Comments
 (0)