Bug 224213 - Zoom effect: Lock position
Summary: Zoom effect: Lock position
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-25 20:00 UTC by Dotan Cohen
Modified: 2014-02-04 07:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dotan Cohen 2010-01-25 20:00:46 UTC
Version:            (using Devel)
Installed from:    Compiled sources

Please add an option for a keyboard shortcut to lock the position of the screen when zoomed in, so that it no longer follows the mouse. Furthermore, in this situation, the mouse pointer should be confined to the area of the screen that is shown.

Compiz-Fusion has this feature and it really makes the Zoom feature much more comfortable. Thanks!
Comment 1 Martin Flöser 2011-03-09 20:05:16 UTC
There was some work to make the zoom effect follow the selected widget. I would say that fixes this feature request.
Comment 2 Dotan Cohen 2011-07-17 12:29:59 UTC
Not at all, Martin. Sometimes the area of the screen to be enlarged does not correspond to a particular widget. For instance, I often have to use a terribly small Java applet in my studies. Compiz lets me "full screen it" by zooming into the part of the screen with the applet then locking the zoom in place (and confining the mouse movement to the zoomed area). I cannot do this in Kwin.
Comment 3 Thomas Lübking 2011-07-17 12:43:49 UTC
Sorry, i fail to understand the problem.

If you set the mouse tracking to proportional and zoom into the "terribly
small Java applet"* you should be able to work just fine with it.

What you demand here sounds (to me) like a "proprietary" way of saying "xrandr -s 640x480" *shrug*

"Confining" the mousecursor btw. means warping, and that means that you'll have to provide a /very/ good reason for this ("compiz does it" is not - warping remains evil nevertheless)

Btw: keyboard focus tracking doesn't work here, i assume it requires client support.

*that alone makes me want to tag this as won't fix, scnr - we're currently bashing java UI classes as now a running gag ;-P
Comment 4 Dotan Cohen 2011-08-03 13:32:05 UTC
> Sorry, i fail to understand the problem.

The problem is that when the user moves the mouse the whole screen pans. The desired effect would be to not pan, and to limit the mouse's movement to only the portions of the screen currently shown.

> If you set the mouse tracking to proportional and zoom into
> the "terribly small Java applet"* you should be able to work
> just fine with it.

Thanks. I am able to use the applet, but whenever I move the mouse the whole screen pans. It is very disorienting.


> What you demand here sounds (to me) like a "proprietary" way
> of saying "xrandr -s 640x480" *shrug*

Yes! I just tried that and it had a similar effect to what I intend. However the xrandr method is not adequate as:
1) It requires the user to use the CLI and to know xrandr. KDE is a desktop environment, that is why we have Dolphin instead of typing cd and mv for file management.
2) The xrandr method only gives the upper left corner of the screen. The desired content is not always in that corner.
3) The mouse cursor is scaled up as well as the section of the screen in question. This just looks silly.


> "Confining" the mousecursor btw. means warping, and that means
> that you'll have to provide a /very/ good reason for this ("compiz
> does it" is not - warping remains evil nevertheless)

What exactly is warping in this sense? I would like to give a good argument in favor, but I do not understand the question. I agree that "Compiz does it" is not a good reason!


> Btw: keyboard focus tracking doesn't work here, i assume it
> requires client support.

It is working here. ATI video, fglrx driver.


Thank you for your interest. As soon as I know what warping is I'll try to provide a good argument.
Comment 5 Thomas Lübking 2011-08-03 20:39:17 UTC
I'm not aware of any X protocol to "confine" the mouse, so the only way to do i could think of was to
a) ensure the mouse is passively grabbed (also for active windows. that's wonky enough) - or use polling... (what some effects however do anyway)
b) check whether the mouse exceeds bounds, take it and place it back (can confuse input devices -esp. a problem with pens- as well as clients "am i under the mouse" idea)

The general rule of thumb is to avoid either unless you really must.
b) is called warping afer the function "XWarpPointer" and don't dare to even consider to ask for the "warp" term - rather google... ;-)

I see no major problem with locking the mousetracking on a shortcut, but would certainly not "confine" the cursor w/o strong indication or pre-absolution.
Rather shift the zoomed area to keep the pointer in sight (just like panning with a "Virtual" resolution)
Comment 6 Martin Flöser 2012-03-11 14:49:02 UTC
There is a config option to disable mouse tracking. Sounds good enough to me :-)
Comment 7 Dotan Cohen 2012-03-11 15:56:22 UTC
> There is a config option to disable mouse tracking. Sounds good enough to me :-)
>

The problem with disabling mouse tracking is that the zoom effect then only zooms to the upper-left corner of the window. One then has to configure and manually pan to the desired location, which is very time consuming and difficult. Additionally, with mouse tracking disabled the mouse leaves the zoomed area.
Comment 8 Thomas Lübking 2014-02-03 20:37:19 UTC
Grepping through zoom bugs:
Have you tried the "Push" variant"?

It allows to move around the cursor and when touching an edge, the screen will confine to the mouse. Not exactly your demand, but seems very similar.
Comment 9 Dotan Cohen 2014-02-04 07:09:26 UTC
Thank you Thomas. The "Push" variant does have it's uses, in fact this is the mode that I currently prefer for casual use.

The Compiz solution uses "Push", but there is an additional shortcut which when activated performs the following changes:
1) Disables mouse tracking.
2) Prevents the mouse from leaving the currently-visible portion of the screen.

This is terrific for "narrowing" the screen to only a portion of the screen. Thus, one could "fullsize" a Java app in a webpage, an application that demands a small window, or many other uses. My mother in law used this feature to zoom into a silly legacy app that she uses (in Wine, to boot). She would zoom into the app and "lock" the screen, so the app was 1) fullscreen, and 2) larger fonts, buttons, etc which is great for those with poor eyesight.