https://bugs.kde.org/show_bug.cgi?id=369658
Matt Whitlock <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #49 from Matt Whitlock <[email protected]> --- I found this bug report while developing an application that tints its main window icon with a different color depending on the application's state. It was working great until I installed a Desktop Entry file for my application. As soon as I ran kbuildsycoca6, my application's task manager button instantly changed to the untinted icon referenced by the Desktop Entry. Plasma Shell now ignores *both* my application-default window icon that I set via QGuiApplication::setWindowIcon(const QIcon&) and my window-specific window icon that I set via QWidget::setWindowIcon(const QIcon&). After reading this thread, I now understand that this is "by design," but it's a damn shame. If you're going to argue that the task manager buttons are not meant to correspond to visible windows (a fair albeit debatable argument), then at least you should admit that they correspond to *applications*, in which case shouldn't they show the icon set via QGuiApplication::setWindowIcon(const QIcon&), which conceptually sets the "application icon"? The icon specified by the Desktop Entry is really for showing in launcher menus and system configuration dialogs; it's not meant to override a running process's specification of its application icon. (In reply to David Faure from comment #44) > That could be fixed by having specific API for an app to set the window > icon, i.e. it wouldn't be done by most applications, only by those that > really need it Isn't that exactly the purpose of QWidget::setWindowIcon(const QIcon&)? https://doc.qt.io/qt-6/qwidget.html#windowIcon-prop Unfortunately, the QWidget::windowIcon property is effectively ignored as soon as you install a Desktop Entry for your application. Quite surprising to an application developer that such a window property so fundamental as an icon would be ignored. Incidentally, the QWidget::windowIcon is *also* ignored by the kwin_x11 window manager as soon as a Desktop Entry is installed, but that's maybe a separate bug. -- You are receiving this mail because: You are watching all bug changes.
