Revert "desktop grid: zoom hovered window"
ClosedPublic

Authored by sebas on Mar 24 2016, 12:02 AM.

Details

Summary

This reverts commit 14d1fdf63fc27d908f062695e85fa55dde725b55.

The zoom effect is definitely the wrong way, it's broken (can be
triggered without moving the mouse, expands windows outside of their
allotted area (looks like broken sizing/placement), isn't animated so
feels very choppy, isn't using well-known highlight semantics), the
result is that it feels unnatural and jarring. To be honest, when I
looked at it, I was looking for a bug in the code, e.g. margins not
being taken into account. It didn't come up in me that this could be
wanted behavior, until I read the code.

As to the original commit message: The highlight is useless for this
case, as any window can be dragged or activated, highlighted or not.

What *could* work is to somehow intensify the colors, but that again
would have to be animated, and play well with the ongoing desktop-zoom
animation, the mouse pointer location changes relative to the window, so
it's really complex to get right. I thought of this for a while, I don't
think the complexity that has to be implemented is worth the benefit,
because, what does highlighted really mean here? "window is under the
mouse" isn't a useful metric, as we don't know if the user is changing
desktops or rearranging windows, and "window under mouse" changes
depending on the zoom level, "window can be dragged or activated" also
isn't a useful metric, as I can do that with any window, anyway.

Test Plan

Tested with patch applied, desktopgrid windows don't jump around anymore.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sebas updated this revision to Diff 2927.Mar 24 2016, 12:02 AM
sebas retitled this revision from to do not zoom in highlighted windows.
sebas updated this object.
sebas edited the test plan for this revision. (Show Details)
sebas added a reviewer: graesslin.
Restricted Application added a project: Plasma. · View Herald TranscriptMar 24 2016, 12:02 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas updated this revision to Diff 2928.Mar 24 2016, 12:05 AM
  • these bools are not needed anymore
graesslin edited edge metadata.Mar 24 2016, 6:45 AM

This is a relatively new feature, introduced with:
commit 14d1fdf63fc27d908f062695e85fa55dde725b55
Author: Thomas Lübking <thomas.luebking@gmail.com>
Date: Mon Sep 14 11:36:56 2015 +0200

desktop grid: zoom hovered window

To indicate that the window is "active" ie. can
be dragged or activated (like in present windows)
There was either a bug or a forum post complaining
about the inability to activate windows from DG

The reasoning of the commit makes also sense. Is there maybe a way which can incorporate both aspects? Showing which window is the one to be interactive and not having a jarring effect?

sebas added a comment.Mar 24 2016, 1:13 PM

Well, the zoom effect is definitely the wrong way, it's broken (can be triggered without moving the mouse, expands windows outside of their allotted area (looks like broken sizing/placement), isn't animated so feels very choppy, isn't using well-known highlight semantics), the result is that it feels unnatural and jarring. To be honest, when I looked at it, I was looking for a bug in the code, e.g. margins not being taken into account. It didn't come up in me that this could be wanted behavior, until I read the code.

As to the original commit message: The highlight is useless for this case, as any window can be dragged or activated, highlighted or not.

What *could* work is to somehow intensify the colors, but that again would have to be animated, and play well with the ongoing desktop-zoom animation, the mouse pointer location changes relative to the window, so it's really complex to get right. I thought of this for a while, I don't think the complexity that has to be implemented is worth the benefit, because, what does highlighted really mean here? "window is under the mouse" isn't a useful metric, as we don't know if the user is changing desktops or rearranging windows, and "window under mouse" changes depending on the zoom level, "window can be dragged or activated" also isn't a useful metric, as I can do that with any window, anyway.

graesslin requested changes to this revision.Mar 24 2016, 1:34 PM
graesslin edited edge metadata.

please upload it as a revert of the original commit

This revision now requires changes to proceed.Mar 24 2016, 1:34 PM
sebas updated this revision to Diff 2935.Mar 24 2016, 1:44 PM
sebas edited edge metadata.

put it as revert of original commit

sebas updated this revision to Diff 2936.Mar 24 2016, 1:48 PM
sebas retitled this revision from do not zoom in highlighted windows to Revert "desktop grid: zoom hovered window".
sebas updated this object.
sebas edited edge metadata.

update commit message

graesslin accepted this revision.Mar 24 2016, 1:49 PM
graesslin edited edge metadata.

I don't have a strong opinion about it. As always I say: Desktop Grid needs to be rewritten in QML and merged with Present Windows.

I see that it's difficult to get the highlighting and animation done correctly with the current code base. So if you think it's better to not have the zoom effect that's fine with me.

This revision is now accepted and ready to land.Mar 24 2016, 1:49 PM
This revision was automatically updated to reflect the committed changes.