Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: Typing into XWayland windows fails #18

Closed
markstos opened this issue Aug 3, 2020 · 7 comments
Closed

Bug: Typing into XWayland windows fails #18

markstos opened this issue Aug 3, 2020 · 7 comments
Labels

Comments

@markstos
Copy link
Contributor

markstos commented Aug 3, 2020

While typing in Wayland has approved, now typing into XWayland windows doesn't work.

Ugh.

It appears we need use wtype if the active window is a Wayland window, and xdotool type if it's an XWayland window.

For a window manager like Sway, you could figure out the active window type with scripting, but I don't know if there's a general solution for all Wayland compositors or not.

I'll probably give up on having typing work and switch to putting the codes on the clipboard instead.

This could be possibly be fixed in wtype instead. Looks like it's already Issue #1 in wtype:
atx/wtype#1

@markstos
Copy link
Contributor Author

markstos commented Aug 3, 2020

On the plus side, I confirmed that --clipboard-cmd wl-copy works on Wayland to copy to the clipboard.

@emlun
Copy link
Owner

emlun commented Aug 10, 2020

Hm, ok. So I guess the scenario here is that you have a Wayland environment, in which you have both XWayland and native Wayland windows? Meaning WAYLAND_DISPLAY will be set for both kinds of windows?

@emlun emlun added the bug label Aug 10, 2020
@markstos
Copy link
Contributor Author

Correct. Wayland typically launches XWayland as a proxy for X11 apps. I confirmed by launching a Wayland-native terminal and X11-native terminal under XWayland reviewed the output of env in both to confirm that WAYLAND_DISPLAY was set in both cases.

@emlun
Copy link
Owner

emlun commented Aug 10, 2020

Ok. In that case I don't know if there's much we can do in this script, it might be down to assembling the yubikey-oath-dmenu command dynamically in the window manager settings like you mentioned above. I'm not too keen on adding window manager introspection as an integrated feature, though mostly because I'm not familiar with how that would work.

@markstos
Copy link
Contributor Author

Let's close this in favor of having wtype fix the issue upstream.

@markstos
Copy link
Contributor Author

Using ydotool may be a better solution for typing. It is not specific to Wayland or X11. Rather, it emulates an input device, like a keyboard. Thus, it can "type" into both Wayland, XWayland, X11.

@emlun
Copy link
Owner

emlun commented Aug 26, 2020

Thanks for the tip! I'll look into that for the next few updates.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants