Opened 12 years ago

Closed 9 years ago

Last modified 6 years ago

#2466 closed defect (out of date)

incorrect tray icon sizes (and clipping)

Reported by: jgxenite Owned by: charkins
Milestone: Component: pidgin (gtk)
Version: 2.5.8 Keywords: docklet
Cc: atti, beevvy

Description

I have Pidgin starting with my computer (via Sessions). When it starts, the icon is quite small in the tray (see attached screenshot - top picture). However, if I close Pidgin and re-load it, the icon is the correct size (as it was in previous versions of Pidgin - bottom picture).

Attachments (6)

pidgin-tray.png (6.4 KB) - added by jgxenite 12 years ago.
Comparison of Pidgin tray icon sizes. Top is at session start, bottom is after Pidgin close and re-open
PidginInTray.png (26.2 KB) - added by private_lock 12 years ago.
Icon too large
pidgin211_icewm_tray_fix.patch (518 bytes) - added by Lobsang 11 years ago.
pidgin-2.x.x-tray22px-fix.patch (418 bytes) - added by tomkiewicz 11 years ago.
temporary workaround
kde4-icon-size-bug.png (6.0 KB) - added by tomkiewicz 10 years ago.
bug still exists in KDE 4.2.4
gtkdocklet_debug.diff (898 bytes) - added by deryni 9 years ago.

Download all attachments as: .zip

Change History (59)

Changed 12 years ago by jgxenite

Comparison of Pidgin tray icon sizes. Top is at session start, bottom is after Pidgin close and re-open

comment:1 Changed 12 years ago by pantsgolem

I have pretty much the same problem, but instead of a tiny icon, I get a 32x32 icon. I'm using KDE as my desktop if that makes a difference. (I can't tell from if jgxenite is using GNOME or KDE from the screenshot.) I also see the problem regardless of whether Pidgin is started from a session restore or from the applications menu.

BTW, disabling and re-enabling the tray icon in Preferences is a faster workaround than restarting the program. Both methods sometimes take several tries for me.

comment:2 Changed 12 years ago by jgxenite

Sorry, I should have said that I am using Gnome. I've also noticed that if I kill and re-start gnome-panel, then the icon resizes back to being small again, and when starting the application (before the icon is loaded fully) Pidgin seems to request a very big space in the tray, before resizing down to the proper size.

comment:3 Changed 12 years ago by lithium

I think I filed the same bug as described by jgxenite in his last comment some time ago (killing gnome-panel => 16x16 icon). I cannot find the bug ATM, but I can confirm the problem

comment:4 Changed 12 years ago by charkins

  • Milestone set to 2.3.0
  • Owner set to charkins
  • Status changed from new to assigned

Changed 12 years ago by private_lock

Icon too large

comment:5 Changed 12 years ago by private_lock

Great, this is already detected!

... when my pidign comes up, it often (I'd say 50%) gets the wrong, too large size. Maybe this depends on whether my systray is hidden, the moment the icon is added or not. I somehow think, if I try to watch the process, dragging my mouse down for kicker to appear, it more often gets corrupted than when I don't access the bar, so it can finish loading in the hidden state.

Sometimes, resizing the hight of kicker solved the problem, but deactivating the trayicon in pidgin is a lot faster and for me more reliable (thanks pantsgolem).

My system is Kubuntu with Pidgin 2.1.1

comment:6 Changed 12 years ago by charkins

  • Keywords docklet added
  • Summary changed from Tray icon size wrong on session start, but correct after close and re-open to incorrect tray icon sizes (and clipping)

I've marked ticket #2808 as a duplicate of this. That ticket reports clipping of the tray icon. All of these seem to be related to the size allocated to the GtkWidget? and the docklet attempting to size itself to the smallest dimension (width or height) of the allocated size. I'm getting "size-allocate" signals with the smallest dimension as 3, 16, 22, 24, 48, 200 all without changing the size of the gnome-panel. Things seem to work for me when I launch normally (though not for others apparently), but if restart or SIGHUP gnome-panel, I always am seeing sizing issues.

Changed 11 years ago by Lobsang

comment:7 Changed 11 years ago by Lobsang

I first noticed this problem when I upgraded to pidgin 2.1.1. I'm attaching an interim patch that "works around" the problem.

comment:8 Changed 11 years ago by charkins

Lobsang: Thanks for the patch, seems to be the best solution for now. Can I get your first/last name so I can add you to the COPYRIGHT file?

comment:9 Changed 11 years ago by charkins

Looks like that approach is not going to work as it breaks side oriented notification areas. I'll continue looking for an appropriate solution.

comment:10 Changed 11 years ago by charkins@…

  • Milestone changed from 2.3.0 to 2.2.3
  • Resolution set to fixed
  • Status changed from assigned to closed

(In f2ac3f0cdea64fd5e603c5350cabf85ed619f5e3) Use widget allocation height to determine docklet icon size on x11, rather than the minimum of the height and width. This fixes cases where we are getting randomly small allocation widths and ending up with a tiny docklet icon. Fixes #2466.

comment:11 Changed 11 years ago by charkins

  • Resolution fixed deleted
  • Status changed from closed to reopened

This was auto closed from my commit message, but I later disapproved that revision. Re-opening.

comment:12 follow-up: Changed 11 years ago by onlineapps

Yeah, I've also got that problem on Kubuntu 7.10. I'd LOVE to have this fixed real soon.

comment:13 in reply to: ↑ 12 Changed 11 years ago by DrScofield

Replying to onlineapps:

Yeah, I've also got that problem on Kubuntu 7.10. I'd LOVE to have this fixed real soon.

same problem on kubuntu 7.10 here. also found out that if i resize the panel (in my case a living on the left edge of the screen) to "small" and then back to my desired size ("large"), that the icon size changes down to small and stays that way and i end up having all icons the same size and nicely arranged in the systray part of the panel :-)

comment:14 Changed 11 years ago by bluehat_mobiletux

I also get the large icon at initial start ver. 2.4.0. I also use KDE as my environment. If I go into preferences and switch on/off the tray icon setting between never and always, after several times the correct tray icon size appears. When I was running version 2.3.1 I never noticed this behavior....

hope this was correct ticket to submit. I thought it was unnecessary to submit new ticket to 2.4.0

comment:15 Changed 11 years ago by novosirj

I have this problem on Kubuntu 8.04. The tray icon is twice as large as it should be when started, and turning it on and off a number of times will resolve the problem. This has been annoying me since early 2.0 releases -- it's a shame it has not been fixed by now.

comment:16 Changed 11 years ago by dkbg

Also experiencing this problem with GNOME and Pidgin 2.4.2.

Changed 11 years ago by tomkiewicz

temporary workaround

comment:17 in reply to: ↑ description Changed 11 years ago by tomkiewicz

pidgin211_icewm_tray_fix.patch does not work fine for me - I've applied that patch, but there was no improvement... But I've modified it a bit (see pidgin-2.x.x-tray22px-fix.patch - tested with 2.4.2) and now works OK - Pidgin icon now can be only 22px.

That's not a solution, but temporary workaround for people like me, who gets crazy when KDE's tray breaks and display in one line instead of two...

comment:18 Changed 11 years ago by gagern

My bug #2025, which was just duped here, contains another patch to work around the problem of too-large icons in KDE, and a bit more debug information. The patch works by ignoring information from KDE about a 200x200 icon size, which works for me even though I don't fully understand why. It seems a less severe modification than the ones proposed here, as it makes no assumptions about orientation or fixed size.

comment:19 Changed 11 years ago by charkins

Thanks gagem. As indicated in comment #6 here, the problem is the gtk is sending us "size-allocate" signals, with minimum dimensions of at least 3, 16, 22, 24, 48, 200. Ignoring just 200 may still result in incorrectly sized icons. I was hoping that switching to the GtkStatusIcon? (ticket #2629) might solve this problem, but it appears from your comment there that this isn't the case. I'm going to dig into this again and see if I can figure out a more appropriate solution.

comment:20 follow-up: Changed 11 years ago by penguino

Folks - this happens to XChat as well, just thought you should know. It happens if too many systray-equipped apps are started too quickly, or seems to.

comment:21 in reply to: ↑ 20 Changed 11 years ago by gagern

Replying to penguino:

It happens if too many systray-equipped apps are started too quickly, or seems to.

Doesn't seem part of the cause here. Rather the contrary: I used to start pidgin manually, and had the problem about 50% of the times I started it. Now I included it in my session so it will start together with other systray apps, and the bug only occurs about 10% of the times now.

comment:22 Changed 11 years ago by penguino

Interesting. Maybe the autostarting is related then. I note that if I start all the apps slowly, with a couple of seconds between, nothing goes wrong. If I click them in a quick row, either Pidgin or XChat will end up with large icon - doesn't seem to affect any other apps but that may just be coincidence.

comment:23 Changed 11 years ago by private_lock

I just did a quick test ... starting Pidgin manually about ten times. I could not get the small icon on startup: always to large! In fact I cannot remember getting it right over the last couple of month. So I daily use the hack to hide and show the icon again in pidgin preferences.

I start Pidgin with KDEs session saver that reloads programs that were open on last logoff. Currently I have 2.4.1 But this "feature" is rock solid and stable. Also if I watch kicker while the icon is added or leave it hidden ... I cannot tell the difference anymore.

comment:24 Changed 11 years ago by wraithmonk

I'm using Mandriva 2008 & KDE 3.5.9. Like others here, I too am getting a large Pidgin icon in the systray on KDE startup. If I "Quit" & then restart Pidgin, I get the correct small icon in the KDE systray. This happens in the 64 & 32 bit versions of the distro.

comment:25 Changed 10 years ago by dawg

Last edited 6 years ago by dawg (previous) (diff)

comment:26 follow-up: Changed 10 years ago by bernmeister

Is this still an issue in Pidgin 2.5.8? I can't seem to reproduce...

comment:27 in reply to: ↑ 26 ; follow-up: Changed 10 years ago by charkins

Replying to bernmeister:

Is this still an issue in Pidgin 2.5.8? I can't seem to reproduce...

Interesting, I can't seem to reproduce anymore on Fedora 11. I doubt this has anything to do with pidgin and more likely a fix with the notification area in Gnome or possibly in gtk. I still have some F10 machines around which I'm fairly certain still exhibited this bug a few months ago. I'll see if I can narrow things down by looking at F10 vs. F11 with pidgin 2.5.8. I'd be nice to point to a specific version of Gnome or gtk which fixes this if we're going to close this ticket.

By the way, when looking into this in the past, I found the easiest way to reproduce was to toggle the display docklet setting from never to always back and forth a few times.

comment:28 in reply to: ↑ 27 Changed 10 years ago by jgxenite

Replying to charkins:

Interesting, I can't seem to reproduce anymore on Fedora 11. I doubt this has anything to do with pidgin and more likely a fix with the notification area in Gnome or possibly in gtk. I still have some F10 machines around which I'm fairly certain still exhibited this bug a few months ago. I'll see if I can narrow things down by looking at F10 vs. F11 with pidgin 2.5.8. I'd be nice to point to a specific version of Gnome or gtk which fixes this if we're going to close this ticket.

The only time I ever see this bug is when I have Pidgin loading on session start up, and I'm still seeing it in Fedora 11.

comment:29 Changed 10 years ago by darkrain42

  • Version changed from 2.1.0 to 2.5.8

comment:30 Changed 10 years ago by private_lock

I haven't seen this since KDE 4.x anymore ... for me this bug faded away with KDE 3.x

comment:31 Changed 10 years ago by tomkiewicz

private_lock: unfortunately, bug still exists, but in KDE 4 icon is cropped (see image below).

I'm using OpenSUSE 11.1 with KDE 4.2.4 and Pidgin 2.5.8

Changed 10 years ago by tomkiewicz

bug still exists in KDE 4.2.4

comment:32 follow-up: Changed 10 years ago by deryni

What exactly are we looking at in that screenshot? What's the difference between the two "boxes"? Why is the volume icon on the left messed up?

comment:33 Changed 10 years ago by jithin1987

I also have the same issue in kde 4,3 kubuntu. I found a work around.

In /usr/share/pixmaps/pidgin/tray . Move folder 48 to 48.bak and create a symlink to 22 in the name of 48.

drwxr-xr-x 2 root root 4096 2009-08-25 18:12 16 drwxr-xr-x 2 root root 4096 2009-08-25 18:12 22 drwxr-xr-x 2 root root 4096 2009-08-25 18:12 32 lrwxrwxrwx 1 root root 3 2009-08-25 18:54 48 -> 22/ drwxr-xr-x 2 root root 4096 2009-08-25 18:12 48.bak

This works fine for me.

comment:34 in reply to: ↑ 32 Changed 10 years ago by sniperbeamer

Replying to deryni:

What's the difference between the two "boxes"?

Left box: Pidgin incorrectly uses the 48x48 icon
Right box: Pidging chose the correct icon size

For me Pidgin uses the large icon about 10-20% of the time when it's in autostart.

comment:35 Changed 9 years ago by jithin1987

Hi I am noticing the same behavior in in kde 4.3.3 arch linux. When pidgin starts with kde session. It uses the large icon 48x48. But when started normally it uses the correct icon.

comment:36 Changed 9 years ago by deryni

Does anyone who is experiencing this issue with reasonable repeatability build their own pidgin or is anyone willing to do so (to try out the simple patch I'm attaching which just logs the size pidgin receives, to see if we are in fact being given the "wrong" size when pidgin is started with the session)?

Changed 9 years ago by deryni

comment:37 Changed 9 years ago by jithin1987

Under normal condition (11:00:36) docklet: docklet_height=0 - height=200 - width=200

But for this I had to invoke pidgin with -d. Now when starting part of session how do I do that?

comment:38 Changed 9 years ago by jithin1987

Finally I think I got the data. I had to edit .purple/prefs.xml and change the dubug field.

session start (17:56:04) network: Got StateChange? from NetworkManager: 2. (17:56:04) docklet: embedded (17:56:04) gtkblist: added visibility manager: 1 (17:56:04) prefs: /pidgin/debug/width changed, scheduling save. (17:56:04) docklet: docklet_height=200 - height=48 - width=48 (17:56:04) docklet: docklet_height=48 - height=48 - width=48 (17:56:09) util: Writing file prefs.xml to directory /home/jithine/.purple (17:56:09) util: Writing file /home/jithine/.purple/prefs.xml

manual start (17:56:54) docklet: embedded (17:56:54) docklet: docklet_height=48 - height=48 - width=48 (17:56:54) docklet: docklet_height=48 - height=200 - width=200 (17:56:54) docklet: docklet_height=200 - height=200 - width=200 (17:56:54) docklet: docklet_height=200 - height=22 - width=22 (17:56:54) docklet: docklet_height=22 - height=22 - width=22 (17:56:59) util: Writing file prefs.xml to directory /home/jithine/.purple

But even with session start if I log out and log in it will pickup correct icon. Only starting a new session after restart/shutdown is affected

comment:39 Changed 9 years ago by jithin1987

Sorry for the spam. the previous one was not formatted.

Finally I think I got the data. I had to edit .purple/prefs.xml and change the dubug field.

session start

(17:56:04) network: Got StateChange from NetworkManager: 2.
(17:56:04) docklet: embedded
(17:56:04) gtkblist: added visibility manager: 1
(17:56:04) prefs: /pidgin/debug/width changed, scheduling save.
(17:56:04) docklet: docklet_height=200 - height=48 - width=48
(17:56:04) docklet: docklet_height=48 - height=48 - width=48
(17:56:09) util: Writing file prefs.xml to directory /home/jithine/.purple
(17:56:09) util: Writing file /home/jithine/.purple/prefs.xml

manual start

(17:56:54) docklet: embedded
(17:56:54) docklet: docklet_height=48 - height=48 - width=48
(17:56:54) docklet: docklet_height=48 - height=200 - width=200
(17:56:54) docklet: docklet_height=200 - height=200 - width=200
(17:56:54) docklet: docklet_height=200 - height=22 - width=22
(17:56:54) docklet: docklet_height=22 - height=22 - width=22
(17:56:59) util: Writing file prefs.xml to directory /home/jithine/.purple

But even with session start if I log out and log in it will pickup correct icon. Only starting a new session after restart/shutdown is affected

comment:40 Changed 9 years ago by deryni

  • Status changed from new to pending

Is the debug window output from a "cold start" different than the output from a logout/login cycle?

Is the desired size 22 pixels?

comment:41 Changed 9 years ago by jithin1987

For logout/login its picking up the correct icon size. The session start I pasted above is the cold start one (after reboot). This one is different.

(10:57:33) docklet: embedded
(10:57:33) docklet: docklet_height=200 - height=22 - width=22
(10:57:33) docklet: docklet_height=22 - height=22 - width=22
(10:57:39) docklet: docklet_height=22 - height=22 - width=22

comment:42 Changed 9 years ago by deryni

I'm assuming (since you didn't directly answer) that 22x22 is the desired size, in which case (as the debug log rather clearly indicates) in the session start case pidgin is simply not being given the right size so it can't size the icon correctly. I'm not at all sure what is up with the weird sizing changes in the manual start case.

If pidgin (really GTK+) doesn't see the desired size there really isn't anything we can do to get this right.

Are there lines where "docklet_height=0" earlier in the log than the lines you have been pasting? I would expect there to be one for the first time the icon is sized.

comment:43 Changed 9 years ago by jithin1987

Sorry for not mentioning. 22x22 is the desired size. There is no docklet_height=0 line in the debug messages. The ones I posted are the only ones.

On session start(reboot one) if I disable the system tray icon and enable it again the correct size is picked up. These are the docket ones in the debug window when I do that.

(15:11:00) docklet: docklet_height=200 - height=48 - width=48
(15:11:00) docklet: docklet_height=48 - height=48 - width=48
(15:11:19) docklet: docklet_height=48 - height=48 - width=48
(15:11:21) docklet: destroyed
(15:11:21) prefs: /pidgin/docklet/show changed, scheduling save.
(15:11:23) docklet: docklet_height=48 - height=200 - width=200
(15:11:23) docklet: created
(15:11:23) prefs: /pidgin/docklet/show changed, scheduling save.
(15:11:23) docklet: docklet_height=200 - height=48 - width=48
(15:11:23) docklet: docklet_height=48 - height=48 - width=48
(15:11:23) docklet: embedded
(15:11:23) docklet: docklet_height=48 - height=48 - width=48
(15:11:23) docklet: docklet_height=48 - height=22 - width=22
(15:11:23) docklet: docklet_height=22 - height=22 - width=22

comment:44 follow-up: Changed 9 years ago by jithin1987

For ubuntu they seems to have found a fix for this here. https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/209440

May be you guys can have a look into it and use the code to fix this.

comment:45 in reply to: ↑ 44 Changed 9 years ago by charkins

Replying to jithin1987:

For ubuntu they seems to have found a fix for this here. https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/209440

May be you guys can have a look into it and use the code to fix this.

They didn't fix the issue, they just hard coded the icon size for KDE. The problem is that we are getting incorrect sizes from Gtk in the size-allocate signal. Switching to GtkStatusIcon? (ticket #2629) may also fix this issue.

comment:46 Changed 9 years ago by deryni

  • Status changed from pending to new

As charkins just said, they "fixed" absolutely nothing, and in fact broke anyone who wants to use KDE with a tray icon size that isn't 22x22. The patch simply checks for the existence of the KDE_FULL_SESSION environment variable and if it is found hard-codes the tray icon size to 22 pixels.

As charkins also said, and as the debug logs provided indicate we are simply getting the wrong sizes from GTK+, and unless we can figure out why that is happening (and whether that is a GTK+ issue or a KDE issue) there isn't anything pidgin can do about it. The move to GtkStatusIcon? may or may not fix it, it depends on where (and what) the issue is.

jithin1987, are you using the Help->Debug Window to view the debug messages or are you using the -d flag when starting pidgin? If you are using the debug window then I am less surprised that no docklet_height=0 line is shown, if you are using the -d output then I am still rather surprised as I'm not at all sure I see how it could get set a size without hitting the debug line first.

In either case the issue (as I said above) is that we are simply not getting the correct size from GTK+.

comment:47 Changed 9 years ago by jithin1987

I am using the debug window only.

comment:48 Changed 9 years ago by deryni

Can you try with with -d output? It likely isn't particularly important but it would be nice (for my sanity at least) to see the initial sizing output.

comment:49 Changed 9 years ago by jithin1987

Actually could you tell me how to do that. I dont know how to feed pidgin -d option during login. When invoking from konsole it was ok. Is there any pidgin startup script I need to modify?

comment:50 Changed 9 years ago by deryni

You would need to find whatever starts pidgin with your session and see if you can configure the command that runs to use -d (and ideally redirect that output to a file, since otherwise it may not go anywhere helpful). Like I said, it probably doesn't matter much so don't spend too much time trying to figure it out.

comment:51 Changed 9 years ago by mescalito

Experiencing this in my kde 4.3.2/debian testing.

What I can tell is that it only happens once, the first time I start pidgin. I don't have it started in the session, just manually. The second time all goes fine.

Is there anything I can do to help you track this behavior? Can do anything you need to.

comment:52 Changed 9 years ago by atti

same issue (icon too large and truncated). kde 4.3.4 + pidgin 2.6.4

comment:53 Changed 9 years ago by QuLogic

  • Resolution set to out of date
  • Status changed from new to closed

As of 2.7.0, we no longer use the same X11 embedding code. Please open a new ticket if the problem persists.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!