Closed BlueManCZ closed 2 years ago
You should ensure that all the windows that are requiring attention are focused, or shaking will continue.
What app is causing that, though? Any reproducer?
Same happens here. For me it is Firefox. I'm not sure on how to see why it is shaking, is there some cli tool or dbus thingy to check?
It was Firefox for me as well, but I remember I encountered the same problem with Telegram and Geary in the past. I don't know how to reproduce it. It just happens sometimes and it's hard to say why.
I've had this happen with multiple applications, but Firefox is the easiest to reproduce. @3v1n0 I can reliably reproduce it with these steps:
Step 2 is critical. I can't reproduce it unless Firefox is minimized.
I can confirm what @inthreedee says. Clicking a link and opening it in Firefox (for me no matter if minimized or not) starts the dancing animation. And there are two cases:
@BlueManCZ It sounds like you have Firefox configured to open links in a new window?
By compaison, I have mine configured to open links in a new tab in the existing window. This could explain the slightly different behavior we're seeing.
No no, mine Firefox opens links in new tabs as well. The clicking on the link can be replaced with
firefox --new-tab https://ddg.gg
command or
xdg-open https://ddg.gg
if you have Firefox as the default browser. Result is the same.
I can also reproduce it with Firefox like this:
Workaround
Same problem with Firefox and Evolution mail on Fedora 34 with enabled extensions :
tray-icons@zhangkaizhao.com
audio-switcher@albertomosconi
just-perfection-desktop@just-perfection
weatherintheclock@JasonLG1979.github.io
gitlab-extension@infinicode.de
dash-to-dock@micxgx.gmail.com
system-monitor@paradoxxx.zero.gmail.com
argos@pew.worldwidemann.com
user-theme@gnome-shell-extensions.gcampax.github.com
Is there a way to disable the shaking behaviour? I find no use for it, the only thing it's doing for me is just being an unwelcome distraction.
I would love to be able to disable it.
@linuxiorr Removing or commenting out these two lines in the code should do the trick I guess:
Removing or commenting out these two lines in the code should do the trick I guess:
While this does stop the shaking animation, this bug is more than just a cosmetic issue. If you have the click to minimize window feature enabled, that click action stops working when this bug is triggered.
I've tried commenting out the entire notify::urgent
block as well, but it still happens.
Some investigation: This line is why the click to minimize feature fails to work: https://github.com/micheleg/dash-to-dock/blob/39e5597da42124a23d3f0d5dbca69fea1f3fa96b/appIcons.js#L483-L484
The hasUrgentWindows flag is failing to be properly cleared when an app is brought to the foreground in this way (ie, clicking a link somewhere else that launches Firefox). This is also why the animation is never cleared. Still trying to figure out if this is a bug here or upstream.
I have found one part of the solution: https://github.com/micheleg/dash-to-dock/blob/39e5597da42124a23d3f0d5dbca69fea1f3fa96b/appIcons.js#L313-L315
Adding a check so we don't set the urgent flag on focused windows seems to prevent this from happening, like so:
_addUrgentWindow(window) {
if (this._urgentWindows.has(window) || window.has_focus())
return;
This isn't a complete solution though because it doesn't solve the main bug. When the bug is triggered for Firefox, for example, you can unfocus and re-focus Firefox and the wobbling never stops, meaning there is another bug somewhere causing the urgent flag to not be cleared correctly when focusing an application.
Nice job @inthreedee. I also got time to analyze this a little and found this workaround.
Insert one line into this function so it looks as follows:
this.connect('notify::focused', () => {
this.urgent = false;
if (this.focused)
this.add_style_class_name('focused');
else
this.remove_style_class_name('focused');
})
I guess it's not the cleanest solution but seems to work.
It looks like both fixes are required to fully squash this. I've opened a pull request: https://github.com/micheleg/dash-to-dock/pull/1613
@BlueManCZ I modified yours a bit to put your change inside the if statement, so the flag gets cleared only on focus of the window.
Heads up for everyone here, some additional debugging help is being requested by @3v1n0 over in the PR. They're having trouble reproducing the problem: https://github.com/micheleg/dash-to-dock/pull/1613#issuecomment-1019027159
Can we somehow disable the shaking completely in all situations? I find it incredibly distracting and annoying and at least in my eyes serves no useful purpose. I understand that some might find it useful, but I think for those that do not, there should be a toggle to disable it.
I absolutely agree to what @hmlendea says. Please allow to disable this feature completely!
More than often I have the scenario that I restore a Firefox session which opens 10+ windows and I do not want to click each of them individually just to get rid of this annoying animation. If this is supposed to focus my attention, it's doing exactly the opposite: I know that there are tons of new windows, I just made Firefox open them. There is absolutely no need to distract me from what I actually want to do whenever I open the dock!
And even if you want to be notified: the icon just shows that one of those windows must be new, but it doesn't give any hint which one. So it becomes completely useless as soon as you have more than one window of the same application.
I think shaking functionality is useful indeed. But, here, on archlinux, telegram is continuously shaking while minimized. Is there a way to stop it doing so? Thank you.
@hmlendea @frederikheld @ghabit I've submitted a PR adding a setting to disable icon shaking 🙂 https://github.com/micheleg/dash-to-dock/pull/1896
Whenever an application window is opened without the user clicking on the dock icon or the notification is received, the icon starts shaking. There is nothing wrong with that. But it never stops doing that. Whenever I click on the icon to focus the window, minimize, click again, etc, the icon is still shaking. I have to close the application and open it again to stop the shaking animation.
Version 71, GNOME 40.4.0
https://user-images.githubusercontent.com/17854950/139556297-610ea889-b31c-441d-8e46-d43c838c38e3.mp4