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

Allow window to follow cursor as well as mouse pointer #17

Open
mcphail opened this issue Feb 3, 2021 · 3 comments
Open

Allow window to follow cursor as well as mouse pointer #17

mcphail opened this issue Feb 3, 2021 · 3 comments

Comments

@mcphail
Copy link

mcphail commented Feb 3, 2021

Possibly tangentially related to PR #15, I was reading a comment from someone who relied on the Compiz magnifier as it was the only one which followed the cursor of typed text as well as following the mouse pointer. Is this something which could be implemented in magnus?

@stuartlangridge
Copy link
Owner

I like the concept, but I have no idea at all how to do it. I don't know of any API that lets you interrogate an app to see where its cursor is, and indeed I don't think such an API can exist -- I've certainly never implemented it in any app I've ever built with a cursor, and if it's done at widget set level you'd still have to cope with multiple widget sets. I don't know how compiz could possibly know this; do you know how it did it? I'm certainly happy to look at allowing magnus to do this if it's not too difficult.

@mcphail
Copy link
Author

mcphail commented Feb 6, 2021

Digging deeper, i think this is in the Enhanced Zoom plugin rather than the Magnifier plugin. Also, it doesn't look like simple code and I'm not quite sure of the magic they are using. I can't even get my head around the preamble at https://git.launchpad.net/compiz/tree/plugins/ezoom/src/ezoom.cpp to begin to understand this. Happy for this to be closed if it isn't feasible.

@stuartlangridge
Copy link
Owner

Having looked around a bit, I have learned the following:

  • Orca seems to have some sort of way to track where the text caret is (implied by https://mail.gnome.org/archives/gnome-accessibility-devel/2007-August/msg00014.html)
  • ezoom was inspired by inputzoom, a plugin for beryl (remember beryl from before compiz?) and used many of the same techniques
  • ezoom apparently did not use AT-SPI, which is what I assume Orca is using
  • I am utterly unable to find any indication of how ezoom or inputzoom worked out where the text caret was in order to follow its position

...none of which is an answer, but it might give you some indication of further places to look, if you didn't know all of this stuff already!

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