Open kurnevsky opened 3 years ago
This is probably from a non existent icon. I think a better solution would be to find the root cause of this issue.
But I didn't notice any missing icons - all tray icons work as expected. The problem is that when this happens I have huge icons and taffybar with much bigger height. So looks like they can't be scaled.
It's weird that the target Height and Width are both 1. I don't think that should be happening. Why would it be trying to scale things to a single pixel?
No idea, but after this patch it doesn't scale things to 1 pixel. Last time this happened after taffybar restart, but before restart it worked fine. Could it be that right after start taffybar has got wrong height?
It's pidgin icon that causes it. Not right after start, but after some time. Probably after receiving a message... When message is received its icon blinks. So probably when it disappears taffybar can't get it as it's supposed to be empty. And after this fix it's shown as it should.
Here is the icon it sets: https://github.com/philipl/pidgin-indicator/blob/master/icons/hicolor/22x22/status/pidgin-indicator-nothing.png Looks like it's 22x22 pixels, so not sure if it really causes this.
It would not be about the icons size. What is being logged is the target size, so the size we are attempting to scale it to. Seems weird that we are trying to scale something to be 1 pixel or 0 pixels. Sounds like maybe the widget is hidden or something when this attempt is made.
. The problem is that when this happens I have huge icons and
The reason you have huge icons is that the attempt to scale the icon is failing, and we are falling back to just returning the unscaled pixbuf. The attempt to scale the icon is failing because we are requesting a non-sensical size. We should figure out why we are requesting this non-sensiscal size.
It would not be about the icons size. What is being logged is the target size, so the size we are attempting to scale it to.
Then I don't get it why after this fix I see taffybar with its usual height and correctly scaled icons, bigger than 1 pixel.
btw, I can't reproduce it - it only happened 2 times, but after it happened taffybar had this problem even after restart. Only after I closed pidgin and restarted taffybar it returned to its normal size.
Then I don't get it why after this fix I see taffybar with its usual height and correctly scaled icons, bigger than 1 pixel.
Probably because after the 1 pixel resize, the bar immediately resizes and that triggers another automatic resize and then you get the correct size.
My suspicion is that there is some type of degenerate condition at startup.
Just reproduced it - it happens after you receive a message in pidgin and then restart taffybar. @IvanMalison any ideas how to debug this?
Gtk requires size to be >0.
I get the following error periodically: