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

adds application name fix for gnome panel and dock #136

Merged
merged 1 commit into from
Sep 14, 2015
Merged

adds application name fix for gnome panel and dock #136

merged 1 commit into from
Sep 14, 2015

Conversation

hiisukun
Copy link
Contributor

See issue #134
Scope limited to GNOME (although could be broadened).

@hiisukun
Copy link
Contributor Author

As an aside, $XDG_CURRENT_DESKTOP seemed to have valid settings on a few DEs. It seemed more reliable than $DESKTOP_SESSION and others, though I don't understand the nuances that drive the differences. In case they are handy, some self-explanatory outputs I got were:

GNOME / Unity / KDE / XFCE / X-Cinnamon / LXDE

I'll leave it to you what the scope of the fix should apply to, and I left it just as "GNOME" for now. It is probably reasonable to expect people using non-standard DEs who want it applied to just remove that part of the if statement.

I'm not sure how you feel about a while $winid not empty loop, but I included it as my very old laptop (running xfce with cairo-dock) took 3-4 seconds to load the livestreamer gui. I don't code much but those kinds of loops scare me a little : D

Poking around a little further while doing it, I wasn't able to improve on the use of wmctrl or find a better alternative.

And of course, thanks to you for the great piece of software!

@bastimeyer
Copy link
Member

Thanks for the PR...

I'm having an issue while testing it right now. I don't know why, but it's just removing the "Unknown" title from the panel and it's not changing it to "Livestreamer Twitch GUI". Although I can see that WM_CLASS(STRING) = "Livestreamer Twitch GUI" is being listed when I check it (xprop -id $winid). Do you know why this is happening? It's basically the same code as before, but now it's just not working. I'm testing it in live-session of Ubuntu Gnome 15.04...

I left it just as "GNOME" for now

Yeah it's ok, this can easily be extend later on...

loop

I guess it should be fine the way it is now.

@hiisukun
Copy link
Contributor Author

Hmm, I'll try and reproduce.

Initial guess if the code seems fine, is perhaps gnome is a little confused. Try reloading it (Alt+F2, type 'r' without quotes then press enter).

I'll sit on freenode for a bit if you'd like to chat outside of these messages.

@hiisukun
Copy link
Contributor Author

I can reproduce this behaviour if I place a newline char \n anywhere in the WM_CLASS string. Notably this includes placing it after the closing quotation marks, like this:

xprop -id 0x02c00001 -f WM_CLASS 8s -set WM_CLASS "Livestreamer Twitch GUI"\n

Any possibility that while dev'ing for crossplatform, some sneaky newline shenanigans is going on? I know it is a bit of a stretch...

So far other than that, I can only get blank title in the gnome menubar by setting the value to an empty string "", though I am scratching my head as to what else to try.

@bastimeyer
Copy link
Member

There is no newline character or something like that... Something must be wrong with my gnome session, I think. It did work for me earlier, so it must be something else.
I'm going to merge this now, thanks for the effort.

@bastimeyer bastimeyer merged commit 9655c15 into streamlink:master Sep 14, 2015
bastimeyer added a commit that referenced this pull request Sep 14, 2015
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

Successfully merging this pull request may close these issues.

2 participants