gnome-shell-extension-appindicator icon indicating copy to clipboard operation
gnome-shell-extension-appindicator copied to clipboard

Pixmap icon is not reset when icon transition from iconpixmap to icon

Open wengxt opened this issue 2 years ago • 2 comments

I have an app that may use both icon and iconpixmap.

When the property transition from IconPixmap to Icon, the previous pixmap is left on the tray

图片

The red part is the expected icon, but the white part under it is the left over of previous icon.

I think it's caused by this commit https://github.com/ubuntu/gnome-shell-extension-appindicator/commit/c14beda5e7b92e2c58fd8594f0a18ebd4633985d that not correctly unset the previous pixmap content when new gicon is used.

wengxt avatar Sep 22 '23 20:09 wengxt

This is weird, because we only set one single gicon... What app is that?

3v1n0 avatar Oct 09 '23 01:10 3v1n0

fcitx5, can you check the commit that I mentioned? basically from my understanding on the code, when icon pixmap is used, the code directly pass the pixmap to the actor, with _setImageContent, which by pass the gicon logic.

https://github.com/ubuntu/gnome-shell-extension-appindicator/blob/e365c01682bc77e31c10b82fe9169817215838b3/appIndicator.js#L1283C10-L1283C10

when iconpixmap is reset to null and Icon is used again, the effect of _setImageContent is not cleared, and cause the effect.

Right now I workaround this bug in latest fcitx5 by always use an transparent overlay icon, since the optimization done by _setImageContent can not handle the composition of an overlay icon, it will enforce the old gicon logic to be used. Marco Trevisan @.***> 于 2023年10月8日周日 18:38写道:

This is weird, because we only set one single gicon... What app is that?

— Reply to this email directly, view it on GitHub https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/468#issuecomment-1752241185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7MZCYLIA67OAQEA7Q553X6NIPTAVCNFSM6AAAAAA5DSNFJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGI2DCMJYGU . You are receiving this because you authored the thread.Message ID: @.*** com>

wengxt avatar Oct 10 '23 03:10 wengxt