-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RFC: full-screen zoom (accessibility via ctrl-scroll) #2781
Comments
This is something I'd like to see in sway, too. However,
This is nonsense, anyone can learn and many people have cut their teeth on sway. https://drewdevault.com/2017/01/06/Actually-you-CAN-do-it.html |
@SirCmpwn I’m glad you’re a fan of the feature. I also did not mean to sound defeatist, and I do agree about the learning. Perhaps I should have said, “I have too much crap going on to commit to this.” Which isn’t an excuse either. 🤪 |
👍 for a screen zoom feature. This is so handy. These days lots of software comes with their own zoom... but still I was using that 1 every day or 2nd-day under KDE and under compiz before that :) @ddevault : As this feature seems to exist in wayfire, could you have a timeboxed look if there could be any chance to re-use / port this to swaywm or better to wlroots if that's possible ? |
No, it wouldn't be possible to port from wayfire to wlroots. |
Can you give a (very broad) overview on how to tackle this issue for someone not familiar with wayland and wlroots APIs? |
This comment has been minimized.
This comment has been minimized.
@nkreer and I would like to implement this as well. But we're both not familiar with wayland/wlroots and need some hints on how to do start this. |
I had a try to implement this by calling glViewport with a rect bigger that the screen, mostly worked ,but each app is zoomed independently, not the whole screen. Another way of doing this might be to render the whole screen to a texture and then enlarge that one. |
Read the docs guys (@vidister hope this helps)! |
Any updates on this one ? |
Wayfire probably does that through OPENGL, which, unless I am mistaken, sway doesn't use. So I don't think implementation would be trivial. And it's a good thing that sway doesn't use OPENGL - saves your battery. |
Sway does use OpenGL (it can also use Pixman on devices without a GPU). |
@emersion how much do you think is complex to build this feature on the current Sway codebase ? Assuming that all the needed pieces are still in place. |
It does!’t look like rocket science so far: /~https://github.com/WayfireWM/wayfire/blob/224bb669836ce987a7e17fe53291bb87a7b0140d/plugins/single_plugins/zoom.cpp |
my bad |
What about vulkan renderer |
Actually, zooming just one window is what I need. Is there a window manager that has this feature? |
I would also very much wish to see this feature come to sway. It would be awesome in order to explain to other people what you're doing right now. |
Is there a tool for wlroots based compositors that implements the magnifying glass feature? |
If anyone's interested, I hacked together a simple zoom in/out tool bound to a key. It zooms all outputs by a scale factor of ±
|
👀 any updates? the above command from @mooreye doesn't seem to work for me, pipefail doesn't seem like an option for me. |
I guess your |
You can also remove |
|
ya, the command works using bash, but doesn't really do what I needed, a workaround I have is to
I could maybe do something like:
|
All of that approaches is a workaround. It should be implemented in compositor (of course if it's not against it's philosophy). That's my workarounds:
Where $1 above is the scale factor |
I once upstreamed a change to KWin earlier this year to fix problems with its screen zoom functionality on multiple monitors. Currently, that means it's the only compositor so far that does zoom just as well as Windows or macOS do. I'm biased in saying this but I'd go so far as to say it should be the standard for all compositors to reference. I'm not at all familiar with Sway, how it works, or how to work with its code. I'd be willing to learn, but I'm very VERY blind and that's going to be a challenge that involves other people. I'm a bit nervous as well because I did just have a really poor experience trying to get started implementing this in another compositor. But I'm sure that, with someone's help at least at first, I could handle implementing a zoom effect. The main challenge with screen zoom is how you handle the mouse and how you handle multiple displays. A lot of compositors that do already have magnification, including Hyprland, only support proportional and tight mouse tracking. This means the zoom area directly moves with the mouse, either proportionally or keeping the mouse in the middle of the screen. This is simpler to implement but can be extremely nauseating at large zoom levels like what I need (3000%+, yes, thousand). If I were to do it, I'd have to know how Sway handles monitor rendering and multi-screen arrangements, and how it renders the mouse cursor. In Kwin's case, monitors are rendered on a giant mosaic and the zoom code takes advantage of this. |
Can you expand a bit on what the fancy zoom looks like and behaves? I'm not super familiar with accessibility and it's not super clear what makes KWin's zoom different from the naive approach. Is it just a matter of how much the zoomed viewport moves when the mouse moves? It might be a challenge to implement in Sway right now because wlroots' scene-graph API doesn't support this. However, if the zoom isn't too fancy it shouldn't be too hard to wire up in wlroots. For instance wlroots could have a source rectangle property for each scene-graph output. |
On MacOS, the zoom feature has a few options for its behavior, but in general, here is how it works - or at least, how I use it.
Zoom.Feature.mp4 |
There's also usually a setting to have the cursor stay centerwd when zoomed in, it only movea once your viewport ia blocked by the edge of tbe screen. |
Thank you for all things sway. I know there are way more important items, especially for 1.0, but I am submitting a feature request for accessibility.
On MacOS, a "killer" accessibility feature is enabling the user to zoom the entire screen via ctrl + two-finger scroll. While there are utilities for creating "magnifying glass" surfaces that zoom in on small parts of the screen, not many window managers support this like MacOS Quartz Compositor.
It would be amazing, and a big win for folks with accessibility needs, if this were a feature in Sway.
I myself don't have the chops to implement this and submit a PR. 😭
The text was updated successfully, but these errors were encountered: