https://bugs.kde.org/show_bug.cgi?id=381266

--- Comment #6 from Ross Williams <gunzy8...@gmail.com> ---
(In reply to Kai Uwe Broulik from comment #5)

Thanks for the info. That approach sounds like a better solution to the regex
based approach. As you say the StartupWMClass and WM_CLASS are a match so it
should be working:

StartupWMClass=crx_gaedmjdfmmahhbjefcbgaolhhanlaolb
WM_CLASS(STRING) = "crx_gaedmjdfmmahhbjefcbgaolhhanlaolb", "Google-chrome"

One more observation for you: the correct icon shows during launch then
switches to being grouped under the chrome icon. Not sure if that indicates
anything?

I ran the searches that you suggested and nothing appeared out of place. I have
pasted the output below:

find /usr/share/applications/ -name *.desktop | xargs grep StartupWMClass

/usr/share/applications/libreoffice-draw.desktop:StartupWMClass=libreoffice-draw
/usr/share/applications/libreoffice-startcenter.desktop:StartupWMClass=libreoffice-startcenter
/usr/share/applications/libreoffice-base.desktop:StartupWMClass=libreoffice-base
/usr/share/applications/libreoffice-impress.desktop:StartupWMClass=libreoffice-impress
/usr/share/applications/libreoffice-writer.desktop:StartupWMClass=libreoffice-writer
/usr/share/applications/libreoffice-math.desktop:StartupWMClass=libreoffice-math
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/sublime_text_3.desktop:StartupWMClass=subl3
/usr/share/applications/Discord.desktop:StartupWMClass=discord
/usr/share/applications/libreoffice-calc.desktop:StartupWMClass=libreoffice-calc

find ~/.local/share/applications -name *.desktop | xargs grep StartupWMClass 

/home/rwilliams/.local/share/applications/chrome-apdfllckaahabafndbhieahigkjlhalf-Default.desktop:StartupWMClass=crx_apdfllckaahabafndbhieahigkjlhalf
/home/rwilliams/.local/share/applications/chrome-fhbjgbiflinjbdggehcddcbncdddomop-Default.desktop:StartupWMClass=crx_fhbjgbiflinjbdggehcddcbncdddomop
/home/rwilliams/.local/share/applications/chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Default.desktop:StartupWMClass=crx_blpcfgokakmgnkcojhhkbfbldkacnbeo
/home/rwilliams/.local/share/applications/chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop:StartupWMClass=crx_pjkljhegncpnkpknbcohdijeoejaedia
/home/rwilliams/.local/share/applications/chrome-gaedmjdfmmahhbjefcbgaolhhanlaolb-Default.desktop:StartupWMClass=crx_gaedmjdfmmahhbjefcbgaolhhanlaolb
/home/rwilliams/.local/share/applications/chrome-aohghmighlieiainnegkcijnfilokake-Default.desktop:StartupWMClass=crx_aohghmighlieiainnegkcijnfilokake

I also tried clearing the ~/.local/share/applications directory of .desktop
files, deleted my Chrome profile and reinstalled Chrome just to get a fresh
environment and I am still suffering the issue on a fresh profile (not logged
in).

I'm going to have a look at the code myself when I get some time (use the ABS
in Arch to build my own copy of plasma-workspace) but I have one question from
a cursory glance at the code so far:

In terms of these two if blocks:

if (services.empty()) {
    services = KServiceTypeTrader::self()->query(QStringLiteral("Application"),
QStringLiteral("exist Exec and ('%1' =~ StartupWMClass)").arg(appId));
}

if (services.empty()) {
    services = KServiceTypeTrader::self()->query(QStringLiteral("Application"),
QStringLiteral("exist Exec and ('%1' =~
StartupWMClass)").arg(xWindowsWMClassName));
}

I assume xWindowsWMClassName maps to WM_CLASS but what does appId refer to?

Thanks your help. I understand it is hell trying to debug something you can't
reproduce :(

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to