Bug 432123 - Libreoffice opens with generic LO icon on panel in wayland, not on X11
Summary: Libreoffice opens with generic LO icon on panel in wayland, not on X11
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.20.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-25 21:38 UTC by Spinnekop
Modified: 2023-04-27 00:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
See LO gerneric icon with two sessions. One is writer, one is calc (58.01 KB, image/png)
2021-01-25 21:38 UTC, Spinnekop
Details
attachment-10948-0.html (2.29 KB, text/html)
2021-01-26 09:59 UTC, Spinnekop
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Spinnekop 2021-01-25 21:38:03 UTC
Created attachment 135183 [details]
See LO gerneric icon with two sessions. One is writer, one is calc

SUMMARY
Libreoffice opens with generic LO icon on panel in wayland, not on X11

STEPS TO REPRODUCE
1. Click on pinned libreoffice writer/calc/impress
2. 
3. 

OBSERVED RESULT
Opens with generic LO icon. 
If click on a different LO package opens with 2nd instance on generic item

EXPECTED RESULT
Writer should open with own icon. So should calc/impress as on X11 session.
Totally reproducible. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch 
(available in About System)
KDE Plasma Version: 5.20.90 (now - same on all previous plasma 5)
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-01-25 22:46:50 UTC
This is a LO bug due to the weird way that the app instantiates itself and then changes its icon. We have workarounds for it on X11, but I guess they don't work on Wayland.

Ideally LO would launch in a more standard manner, but it's probably not gonna happen anytime soon, so we may need to port our workarounds.
Comment 2 Vlad Zahorodnii 2021-01-26 08:33:25 UTC
> [2031352.323]  -> xdg_toplevel@36.set_app_id("libreoffice-startcenter")

libreoffice doesn't update the app id. Please report this bug to libreoffice developers.
Comment 3 Spinnekop 2021-01-26 09:59:46 UTC
Created attachment 135201 [details]
attachment-10948-0.html

Hi

Thanks for checking Vlad. I reported it to LO 3 years ago - still doesn't
work on wayland! It was suggested on another forum that it might be a
plasma bug.

I will do it again (report to LO)

Cheers

Paul

On Tue, 26 Jan 2021 at 08:33, Vlad Zahorodnii <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=432123
>
> Vlad Zahorodnii <vlad.zahorodnii@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REPORTED                    |RESOLVED
>          Resolution|---                         |NOT A BUG
>
> --- Comment #2 from Vlad Zahorodnii <vlad.zahorodnii@kde.org> ---
> > [2031352.323]  -> xdg_toplevel@36.set_app_id("libreoffice-startcenter")
>
> libreoffice doesn't update the app id. Please report this bug to
> libreoffice
> developers.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 4 Vlad Zahorodnii 2021-01-27 09:04:27 UTC
(In reply to Spinnekop from comment #3)
> Created attachment 135201 [details]
> attachment-10948-0.html
> 
> Hi
> 
> Thanks for checking Vlad. I reported it to LO 3 years ago - still doesn't
> work on wayland! It was suggested on another forum that it might be a
> plasma bug.

LO calls set_app_id only once. The app id that it specifies is libreoffice-startcenter, not libreoffice-{write,calc,etc}. I don't see how it can be a plasma bug.
Comment 5 SoilpH96 2022-02-07 10:04:27 UTC
LibreOffice can correctly set its icon if loaded with the gtk3 backend (run SAL_USE_VCLPLUGIN=gtk3 libreoffice --writer to test). Different LibreOffice applications also will show in separate icons on the taskbar. So, it is not a bug affecting LibreOffice as a whole but only its KF5 backend. According to what I found on the LO bugzilla (https://bugs.documentfoundation.org/show_bug.cgi?id=125934) this is due to a missing implementation in Qt5 (https://bugreports.qt.io/browse/QTBUG-77182) of the Wayland specification, that has since been properly implemented in GTK. So this seems to be neither a Plasma nor a LibreOffice bug, rather a Qt bug. It *might* be possible to work around it with some hacks in Plasma, but it's probably better to try getting it fixed upstream.
Comment 6 Filipe Mosca 2023-04-27 00:58:27 UTC
(In reply to SoilpH96 from comment #5)
> LibreOffice can correctly set its icon if loaded with the gtk3 backend (run
> SAL_USE_VCLPLUGIN=gtk3 libreoffice --writer to test). Different LibreOffice
> applications also will show in separate icons on the taskbar. So, it is not
> a bug affecting LibreOffice as a whole but only its KF5 backend. According
> to what I found on the LO bugzilla
> (https://bugs.documentfoundation.org/show_bug.cgi?id=125934) this is due to
> a missing implementation in Qt5
> (https://bugreports.qt.io/browse/QTBUG-77182) of the Wayland specification,
> that has since been properly implemented in GTK. So this seems to be neither
> a Plasma nor a LibreOffice bug, rather a Qt bug. It *might* be possible to
> work around it with some hacks in Plasma, but it's probably better to try
> getting it fixed upstream.

I'm having the same issue on a fresh install of fedora 38 with kde plasma 5.27.4. The code you posted workarounded the bug.