Ease the selected window coming to foreground
Closed this issue ยท 13 comments
I am pretty sure I remember a time when the selected window would ease into its foreground position. In particular, I remember this happening when elastic easing is on. Currently, the window just appears on top with no easing. Does anyone else remember this behaviour, and does anyone remember why it changed or how to bring it back?
@dsheeler You're right. I confirm this.
Unfortunately, this happened since #135. At that time, I noticed the problem, but sorry, I did not fix it. As I remember, the reason was not having time to play with the new API and features. The broken API was really troublesome.
And, I have to say this, otherwise I might be crushed: It's really unfortunate that the Gnome team is pushing the people behind extensions to update them because of some broken stuff going from one Gnome version to the other. I hope backward compatibility to be a key.
@machitgarha, can you point to what worked in the past?
If I understand you correctly, as I remember, after releasing the shortcut (e.g. releasing Tab while switching using Alt + Tab), the selected window was being animated to be placed on the screen, right in its previous position.
And about how to bring the feature back, I have really no idea for now. I made the commits a long time ago (almost a year ago), so if you want, I can take a look and tell you what should be done (or even make the changes myself, if I feel I have time to do so).
@machitgarha, I should have been more clear: I meant, where is the code that used to animate the window to its previous position? I'll take a look at your commits.
@dsheeler Sorry, I have no idea for now where the problem is, and I don't have time to investigate further. I may come back to look at this the next week, but I don't promise. :)
BTW, thank you for your effort. :)
@machitgarha, thank you for looking. I miss the effect! I was looking at older code and still could not figure what does the easing in the code. If you could explain that, I would be very grateful!
@dsheeler, well, look for tween()
function calls mainly, and specifically, this._manager.platform.tween()
. The main functionality of animation effects live in platform.js
, but it might not be necessary to look there.
An example. Look at coverflowSwitcher._animatePreviewToMid()
; the function animates a preview of a window to the current active preview. What tween parameters are is the new state and properties of the preview (e.g. its position). The tween()
function automatically changes the old state to the new one, with animations. Animation properties are put inside tween parameters, e.g. tweenParams.time
is the animation time.
I hope this could help you. :)
@machitgarha, I have hacked my way to something that makes this work. I'll put together a pull request when I get the chance.
simplescreenrecorder-2021-09-02_11.29.48.mp4
@dsheeler Well, that sounds really cool! Personally, I'm not using the extension, because this bug annoys me as hell (and I forgot to at least open an issue for that). So, a special thanks to you! I'm really waiting for that.
@machitgarha, I won't keep you waiting long-- just a few hours, probably ;)
@machitgarha, check out #158. It's a wip pull request because I don't think it's perfect.