Bug 354407 - Slide animation for auto-hide
Summary: Slide animation for auto-hide
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.4.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D2157
Keywords:
: 355512 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-26 15:25 UTC by Mircea Kitsune
Modified: 2016-10-29 18:43 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mircea Kitsune 2015-10-26 15:25:56 UTC
I have my default panel set to auto-hide, so that it pops up once I place the cursor near the bottom of the screen. I noticed that unlike KDE4 Plasma, there is no sliding animation when this happens. The panel simply appears when you move the cursor into position, rather than going in and out of the screen edge. The slide animation had a nicer feel to it, and I would like to see it brought back please.

Reproducible: Always

Steps to Reproduce:
1. Create a panel or simply select the default panel.
2. Unlock widgets. Go to 'More Settings' and set 'Visibility' to 'Auto Hide'.
3. Move the cursor near the edge of the screen to make the panel appear and disappear.

Actual Results:  
The panel just pops in and out immediately.

Expected Results:  
A simple slide animation like in KDE4.
Comment 1 David Edmundson 2015-11-05 19:31:51 UTC
Makes sense.
The panel tries to do it, but it's in a way that will never work.

I'm moving this to kwin as that's where the bulk of the work is needed.

@martin/thomas
As resident autohide guy, I'll do it.
Comment 2 Mircea Kitsune 2015-11-05 20:23:23 UTC
Thanks. But just curious: Why does KWin handle the effects of a panel that's part of plasma-shell? Just seems a little ambiguous... this means that if the kwin_x11 process dies plasma behaves differently, which feels incorrect.
Comment 3 Thomas Lübking 2015-11-05 20:52:39 UTC
per-for-mance.

Moving around windows (let alone shaping them etc) is a costly operation, moving textures in the compositor costs nothing. W/o a compositor, the panel of course needs to handle that itself (if it wants)

@David, you may be able to re-use the clientUn/Minimized signals (just emit them from screenedges) and listen to them as to windowAdded/Closed in the effect.
Comment 4 Thomas Lübking 2015-11-05 21:32:03 UTC
@Mircea
PS: the autohiding panel visibility is meanwhile completely handled inside KWin (if present), so it does really not belong into the client at this point (but for hinting that the client shall be animated at all)
Comment 5 Mircea Kitsune 2015-11-06 00:37:09 UTC
Ah. I was hoping that Plasma can use all compositing features of KWin can by itself. It feels kind of wrong that if you shut KWin down, Plasma will behave differently and some things might not work. If the performance is better however, it's understandable I guess.
Comment 6 Martin Flöser 2015-11-09 07:42:26 UTC
> It feels kind of wrong that if you shut KWin down, Plasma will behave differently and some things might not work

Don't worry about that. In a Wayland world, if KWin shuts down, all processes are killed.
Comment 7 Mircea Kitsune 2015-11-09 11:42:24 UTC
(In reply to Martin Gräßlin from comment #6)
That's actually even more sad. Sometimes KWin crashes, or I restart it manually because of memory leaks or other things getting stuck. Sounds like in the future that might be even more problematic. Would have been nice if the processes stayed more independent of each other.
Comment 8 Martin Flöser 2015-11-09 13:37:58 UTC
(In reply to Mircea Kitsune from comment #7)
> Would have been nice if
> the processes stayed more independent of each other.

As I said: don't worry about that. If we go to Wayland it means: KWin won't crash, KWin won't memory leak. There will never ever be the need to restart KWin. We are fully aware of what it means.
Comment 9 Thomas Lübking 2015-11-09 14:25:27 UTC
(In reply to Martin Gräßlin from comment #8)
> KWin won't crash, KWin won't memory leak.

I'll quote you by that ;-P

@Mircea,
KWin will on wayland have the role of X11 - the same problems apply.
As of today, notably graphics drivers leak texture memory on and crash X11 - and most kwin crashes of today stem from driver crashes (and QScreen nullptr derefs...)

This has nothing to do with plasmashell at all.
On wayland, kwin will simply be the display server, ie. replace (that part of) X11.

Regarding the particular feature, plasmashell still *can* animate its panels by moving them around (notably as substitution if the WM feature is not present, ie. you're running plasmashell on openbox or similar) - it's merely an *offer* to lighten things (and plasma panels as well as notably yakuake have made use of it for a looooooon time now; notably yakuake because yakuake also can animate w/o the kwin effect - it's just far more overhead.

@Martin, given the wayland design, it seems to beg for a hand-over feature; that would also implicitly protect clients against server crashes.
Comment 10 Martin Flöser 2015-11-09 15:39:59 UTC
> @Martin, given the wayland design, it seems to beg for a hand-over feature; that would also implicitly protect clients against server crashes.

yes, in deed and KWayland::Client library supports it. It can detect a connection breakage, destroy all it's resources, watch for the socket to be created again and recreate all resources. So handover in theory possible.

In practice though does Qt(Wayland) not support it and QSocketNotifier cannot properly notify in case of Wayland server crash (socket not deleted). I looked at it once but didn't get a patch into Qt, neither did the QtWayland maintainer before my try.
Comment 11 Thomas Lübking 2015-11-09 15:46:28 UTC
(In reply to Martin Gräßlin from comment #10)
> I looked at it once but didn't get a patch into Qt, neither did the
> QtWayland maintainer before my try.

Because?
(Principal reasons would seem silly, not only could one swap kwin for mutter etc. w/o breaking work, but one could also make fundamental adjustments like moving to another GPU - leaving aside the incresed robustness)
Comment 12 Martin Flöser 2015-11-09 16:11:05 UTC
> Because?
https://codereview.qt-project.org/61608
Comment 13 Gordon 2015-12-20 01:56:04 UTC
I just updated to OpenSUSE Leap 42.1 with Plasma 5.4 and there is no panel animation with auto-hide as described in this bug report.  Please fix this so that the panel animation works as it did with KDE 4.
Comment 14 Martin Flöser 2016-07-14 09:32:03 UTC
Git commit a1afeded6ae63e47d39fc08480e929c0451c51e8 by Martin Gräßlin.
Committed on 14/07/2016 at 09:11.
Pushed by graesslin into branch 'master'.

Emit windowShown and windowHidden from Client::internalKeep and ::internalHide

Summary:
With this change auto-hiding panels are animated again by SlidingPopups
effect.

Test Plan: Test case adjusted, and tested in VM

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2157
FIXED-IN: 5.8.0

M  +14   -2    autotests/integration/screenedge_client_show_test.cpp
M  +2    -0    client.cpp

http://commits.kde.org/kwin/a1afeded6ae63e47d39fc08480e929c0451c51e8
Comment 15 Martin Flöser 2016-10-29 18:43:37 UTC
*** Bug 355512 has been marked as a duplicate of this bug. ***