Skip to content

Commit

Permalink
Allow using on XWayland. (jordansissel#355)
Browse files Browse the repository at this point in the history
This removes behavior introduced by jordansissel#341.

After jordansissel#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 jordansissel#346.
  • Loading branch information
jordansissel authored Sep 3, 2021
1 parent eb04281 commit 6c1db90
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xdo.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,

// This library and xdotool do not work correctly on Wayland/XWayland.
// Try to detect XWayland and warn the user about problems.
if (appears_to_be_wayland(xdpy)) {
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);
return NULL;
}
// TODO(sissel): This was disabled due to issue #346
// -- xdotool works on XWayland for some operations, so it isn't helpful to refuse all usage on XWayland.
//if (appears_to_be_wayland(xdpy)) {
//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);
//return NULL;
//}


/* XXX: Check for NULL here */
Expand Down

0 comments on commit 6c1db90

Please sign in to comment.