Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Is Wayfire compatibility close to Wayland compatibiltiy? #1

Open
ttytm opened this issue Dec 15, 2021 · 2 comments
Open

Is Wayfire compatibility close to Wayland compatibiltiy? #1

ttytm opened this issue Dec 15, 2021 · 2 comments

Comments

@ttytm
Copy link

ttytm commented Dec 15, 2021

Hey just seen your work. Very nice development here. Using easy stroke like a lunatic I'm looking for a possibility to have a mouse gesture app on Wayland?

Is what you created here close to a Wayland compatibility? I didn'T use Wayfire yet and couldn't tell how far a Wayland compatibility is from there?

In any way could you make it Wayland compatible? All coffee on me for this one.

Sending love and blessings. Keep the good work up

@dkondor
Copy link
Owner

dkondor commented Dec 15, 2021

Hi,

thanks for your interest! Unfortunately, it is not possible to have "Wayland compatibility" in a general way, since there is no general (or at least widely supported) way to track the mouse position and carry out general actions in the way required by Easystroke. This is mostly intentional, since this kind of access has security implications, a potential issue under X11. Several Wayland compositors integrate main desktop functionality in their main process for this reason. Wstroke follows this pattern, being integrated into Wayfire as a plugin. Currently, this works well for my purposes.

That being said, I see several options to support Easystroke-like gestures in other compositors beyond Wayfire:

  • Create a new Wayland protocol that allows an external program to handle gestures (basically track the mouse and carry out some actions, like send keypresses). This would allow a generic way to have an Easystroke port that works on all compositors that support this new protocol, but you would have to convince compositor developers to actually support such a protocol. This would have the security issues mentioned above, but there are already protocols that allow clients to perform privileged actions and some discussion on a mechanism to restrict access to security critical protocols, e.g. here. It could make sense to raise this issue in the wayland-protocols repository, mentioning that you're interested in Easystroke-like mouse gestures generally.
  • Port wstroke to other compositors beyond Wayfire. Actually, I don't think this has to be difficult, at least for compositors written in C/C++: what you need is to hook into the code handling mouse events, while the rest of the codebase (outside of easystroke_gestures.cpp can likely be reused without much changes). What could be an issue is that you have to compile everything together, so this needs either support from the compositor devs or an existing infrastructure for external plugins as it is the case with Wayfire. This can become more difficult if C++ plugins are not supported, e.g. GNOME Shell only supports extensions written in JavaScript; in theory, porting the gesture code could be possible though, just more work
  • Try to run unmodified Easystroke with XWayland -- this did not work for me, but other Easystroke users had some success

@ttytm
Copy link
Author

ttytm commented Dec 16, 2021

Hello!
Thank you so much for the reply and the further explanations. It helps a lot to be able to put it into context. I have made contact with a few developers and see what comes out of it.
As far as I can see it my intends were humbled and I'm planning to stay with X11 for a longer time and see what the next year brings. Have a good weekend my friend!

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

No branches or pull requests

2 participants