Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with popups/notifications and Skype #233

Closed
psych opened this issue Jan 25, 2012 · 50 comments
Closed

Possible issue with popups/notifications and Skype #233

psych opened this issue Jan 25, 2012 · 50 comments

Comments

@psych
Copy link

psych commented Jan 25, 2012

I believe there might be an issue with Skype and Cinnamon, possibly to do with the way notifications are displayed. I'm not too sure about this though and can only report what I see.

In Cinnamon 1.2 (this didn't happen in 1.1.3) whenever messages are received in Skype and Skype is minimized, Skype comes to the forefront for me and jumps on top of all other open windows. Obviously this isn't behavior we want. In Cinnamon 1.1.3 a notification Window was displayed in the top right, as I recall, if that option was set in Skype. This is ideal behavior. In Gnome Shell Skype also behaves correctly and a notification top center appears telling me a new message is received.

I've tweaked the chat and notification settings in Skype to just display a notification and not display anything at all. Either way, Skype comes to the forefront.

Skype should not be coming to the top and I believe it might have something to do with notifications if something was changed on the back end of Cinnamon between 1.1.3 and now, because it did used to work well.

Anyone else seeing this?

@KirkM
Copy link

KirkM commented Jan 25, 2012

This is happening to me as well with Skype and Cinnamon 1.2. New chat message comes in and Skype pops to the front taking focus away from all other windows. A bit awkward when you're typing something into a document or in an online form and you suddenly find yourself typing the rest into a Skype message field instead.

@psych
Copy link
Author

psych commented Jan 25, 2012

I'm not the only one!

KirkM, if you used Cinnamon 1.1.3 can you confirm that it did not happen with that release? Also, I would be interested in knowing whether you use Linux Mint or another distro so we can confirm whether it's a Cinnamon issue or something in the way the various components of Mint interact with Cinnamon.

@Carusu
Copy link

Carusu commented Jan 25, 2012

I can confirm this issue using the git version. I'm on Arch Linux

@KirkM
Copy link

KirkM commented Jan 26, 2012

I'm running Cinnamon 1.2 (via the Mint repos) on Linux Mint 12 and I can also confirm that it did not did not happen with Cinnamon 1.1.3.

@psych
Copy link
Author

psych commented Jan 26, 2012

I too am running Mint 12 and have Cinnamon through the Mint repository. Carusu, thanks for chiming in. At least now we know it's happening on two separate distros. I'll refrain from hypothesizing as to what causes this since I know nothing of the internals, but I will say that I'm not seeing issues with Pidgin or Empathy which leads me to believe it might have something to do with the way Skype in particular is handling these things and something that changed in the backend of Cinnamon.

@0v3rth3d4wn
Copy link

I'm also running Mint 12 with Cinnamon 1.2 (merlwiz79 repo) and also have the same problem.

@AngiolettoNero
Copy link

Linux Mint 12 (LISA) with Cinnamon 1.2. I have the same problem.
I confirm that, with Cinnamon 1.1.3, it did not happen.
Thanks.

@jerjanssen
Copy link

I'm seeing this issue with Skype 2.2.0.35 on Ubuntu 11.10...

It looks like this was introduced with commit c30d046 and seems to be isolated to the file 'js/ui/windowAttentionHandler.js'

Simply reverting this change is a usability improvement IMO, but naturally, it reintroduces the issue that this commit was intended to fix:

"Newly open windows are focused by default (instead of appearing in the back with an annoying “Your window is ready” notification)" [1]

I particularly like the subtle "your window is ready" notification while others prefer new windows to steal focus. Perhaps this behavior should be configurable via cinnamon settings.

  1. http://cinnamon.linuxmint.com/?p=119

@psych
Copy link
Author

psych commented Jan 31, 2012

Interesting that this would be the issue. I guess every time a message is received it's considered a new window instead of just a notification of a new message? It seems like a bug that this is what would happen, but is it in Cinnamon or Skype?

@kneekoo
Copy link

kneekoo commented Feb 2, 2012

Oh, this is so annoying... :| I'm in a meeting in Skype and I can't do much as long as people write in there. The focus just keeps getting stolen by Skype.

@ghost
Copy link

ghost commented Feb 5, 2012

Same problem, Cinnamon 1.2 and Skype on Mint 12. (Never used a previous version of Cinnamon though.)

@mindrunner
Copy link

confirm with gentoo and cinnemon 1.2 - very annoying. :(

@psych
Copy link
Author

psych commented Feb 8, 2012

I saw on February 5 Glebihan submitted a fix for this issue and then reverted it because of inconsistent behavior. If there's anymore information that can be provided to help this along or a fix that can be tested I'd be happy to.

@mwik
Copy link

mwik commented Feb 14, 2012

in /usr/share/cinnamon/js/ui/windowAttentionHandler.js, I simpy commented out

window.activate(global.get_current_time());
and now things behave as I want it to. I can't tell though what other effects this has.

@psych
Copy link
Author

psych commented Feb 15, 2012

Awesome! Appreciate that tip.

As a workaround I've set Skype to auto start, move it to the second workspace, and then use pidgin to talk to my skype contacts. I find I actually like Pidgin better to talk to my Skype contacts.

@sniffski
Copy link

possible work around would be to add another check here to ignore skype windows also:
/usr/share/cinnamon/js/ui/windowAttentionHandler.js

---
_onWindowDemandsAttention : function(display, window) {
        if (!window || window.has_focus() || window.is_skip_taskbar())
            return;

        window.activate(global.get_current_time());
    }
---

Maybe something like:
if (!window || window.has_focus() || window.is_skip_taskbar() || window.is_skype_window())
            return;

But I'm not familiar to what methods does window function has and how to describe it...

@0v3rth3d4wn
Copy link

Commenting the line did the job for me! Thank you! Still an officlal fix would be better.

@amrun
Copy link

amrun commented Feb 16, 2012

same here :S i got the problem too.
nearly popped a vein or something until i found out...

cheers

@psych
Copy link
Author

psych commented Feb 17, 2012

Can someone confirm whether this still exists in Cinnamon 1.3?

Updated to Cinnamon 1.3 and this applets thing is giving me a whole host of troubles. Skype icon doesn't appear at all even though Skype is most definitely running (had it set to run on startup) among other things.

@0v3rth3d4wn
Copy link

Same here. The update didn't fix this issue for me. I had to comment out the aforementioned line in /usr/share/cinnamon/js/ui/windowAttentionHandler.js to fix the problem.

@ceejatec
Copy link

Thank you thank you! That jump-to-front was driving me batty. My problem app was the QtCreator IDE, which jumped up as soon as any build completed. Intensely annoying. I just stuck a "return;" at the beginning of _onWindowDemandsAttention() and all is better in the world.

This really needs to be configurable behaviour in Cinnamon...

@amrun
Copy link

amrun commented Feb 22, 2012

is the change to the file
/usr/share/cinnamon/js/ui/windowAttentionHandler.js
overwritten on a new update of the package?

if not, i need to set a reminder ;)

@mwik
Copy link

mwik commented Feb 22, 2012

Yes, it will be overwritten as it is not a configuration file.

@ghost
Copy link

ghost commented Feb 26, 2012

Folks, here is my patch for this issue
https://github.com/rat4/Cinnamon/compare/notification_style

Configurable through "org.cinnamon.notification-style"
Possible values:
0 - do nothing here, but other notificators (window list applet) still can take care
1 - bring window to front, like current cinnamon
2 - show banner "app is ready", like gnome shell

What do you think?

@zakkak
Copy link

zakkak commented Feb 26, 2012

Sounds good, I would prefer something like "new message" however and not "app is ready"

@psych
Copy link
Author

psych commented Feb 26, 2012

Thanks a lot for taking a look at this. I'll attempt to figure out how to patch in the next few days and take this for a spin.

@glebihan glebihan mentioned this issue Mar 15, 2012
@beefsack
Copy link

Problem still exists in Cinnamon 1.4 (Fedora 16 x86_64).

@dimitrov-adrian
Copy link

So waiting for next release ;)

@Ri0n
Copy link

Ri0n commented Apr 13, 2012

same here
Cinnamon 1.4 + gentoo + Psi+

@kneekoo
Copy link

kneekoo commented Apr 14, 2012

Yup, the annoying bug persists. :|

@psych
Copy link
Author

psych commented Apr 14, 2012

Has anyone tried rat4's patch from two months ago to see if it solves this? If it does maybe it can be proposed for inclusion in Cinnamon. I would, but my hard drive on my laptop went kaput and I'm running 12.04 on my desktop which doesn't seem to work with Cinnamon yet.

@kneekoo
Copy link

kneekoo commented Apr 14, 2012

I didn't check the patch. I was hoping an official developer will fix this or at least recommend the patch until an official fix is out. I still have issues with Alt-F2 (not working) but that's another story. The thing is I prefer the official solutions.

@mindrunner
Copy link

Hi,
i made a unified diff of rat4's implementation. You can find it here: http://pastebin.com/4AncNAVA

For the gentoo users, i changed the ebuild using this patch and host it in luman-overlay.
I am just emerging ist and will begin testing right now. I think this should go upstream very quickly.

Edit: The default gnome3 bahavior is set as default, instead of default cinnamon behavior.
I prefer this one and tested it sucessfully on my system.
The others should work as well ;)

@Scott-Mc
Copy link

The patch provided by rat4 works successfully here.

@AlbertJP
Copy link
Contributor

@rat4 Please do a pull request, then we can close this one. The patch may become incompatible if it isn't pulled soon.

@ghost ghost mentioned this issue Apr 17, 2012
@sephiroth6
Copy link

mint 12 + cinnamon 1.4
problem still exists

@AlbertJP
Copy link
Contributor

Yes, #623 is not yet pulled. May end up in Cinnamon 1.5 if such a version ever appears.

@firsyura
Copy link

I found solution for this issue:
http://scott.cm/skype-auto-popup-with-cinnamon/

@dimitrov-adrian
Copy link

@firsyura this break my cinnamon (Ubuntu Oneric, cinnamon 1.4)

@firsyura
Copy link

mint 13 + cinnamon 1.4
This solution is working

@AlbertJP
Copy link
Contributor

@dimitrov-adrian Yes with ubuntu 11.10 / mint 12 you'll have to do it with the repository package (or compile rat4's branch manually) but on 12.04 / 13 it can be fixed and I hope the fix will be pulled into master.

@sniffski
Copy link

sniffski commented Jun 8, 2012

Work around:
Edit: /usr/share/cinnamon/js/ui/windowAttentionHandler.js

Find line:
        if (!window || window.has_focus() || window.is_skip_taskbar())
Replace with line:
        if (!window || window.has_focus() || window.is_skip_taskbar() || window.wm_class(skype))

@clefebvre
Copy link
Member

A lot of work went into this so this is going to come as bad news. I should have reacted to it much earlier.

I don't like the idea of this being configurable.. mainly because this isn't a question of preference but a question of fixing a bug. The focus should always be taken when the user launches a new app and never be taken on his behalf when he doesn't trigger the creation of new content.

For Skype, I fixed the bug with this c5bbcad

For other apps which face a similar issue, I'd like people to insert the following code at line 27 in /usr/share/cinnamon/js/ui/windowAttentionHandler.js:

global.log_error("Focus stolen by : " + window.get_wm_class());

Then restart cinnamon, and when the focus is stolen from you, click on the ^ applet, troubleshoot, looking glass, click on the error tab, and you should see the wm class name of the app which stole your focus. Give me that wm class name, and we'll add it to Cinnamon.

@swedik
Copy link

swedik commented Mar 20, 2013

Same problem with pidgin.
window.get_wm_class() == "Pidgin"
helped.
Thanks

@crazedsanity
Copy link

I am experiencing this issue with Mint 16 Petra, Cinnamon 2.0.14. The issue happens with Pidgin, though I'll admit that's the only messaging system I use.

I am sad to see that this is still an issue. I'd searched for Pidgin-specific bugs for weeks before I realized it wasn't Pidgin at all.

@Alucard1989pl
Copy link

@sniffski thanks for this little guide fix, i've Cinnmon 2.2.13 and I add Kadu communicator on this line and it works perfectly for me :).

@00gavin
Copy link

00gavin commented Mar 19, 2015

Substituting Pidgin for Quassel in /usr/share/cinnamon/js/ui/windowAttentionHandler.js was the fix for me. Cheers!

@cavebeat
Copy link
Contributor

cavebeat commented Nov 7, 2015

hi,
i have the same problem.
every cinnamon update the file /usr/share/cinnamon/js/ui/windowAttentionHandler.js is resetted to upstream values.
i am on LMDE2 64 bit Cinnamon, Cinnamon v2.8.2

i'd need two more Entries to suppress the stealing of Autofocus: Psi+ and RetroShare

I have created the following Pull-Request.
#4801

@densha
Copy link

densha commented Mar 25, 2020

Any updates on this? 3 years later, this is still an issue with the latest version of Linux Mint.

@lgoebkes
Copy link

lgoebkes commented Oct 1, 2020

I can confirm that this is still an issue with Telegram. Are there any updates on this matter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests